public class DefaultVaultCharSecret extends Object implements VaultCharSecret
VaultCharSecret
implementation based on CharBuffer
.Modifier and Type | Method and Description |
---|---|
void |
close()
Destroys the secret in memory by e.g.
|
static VaultCharSecret |
forBuffer(Optional<CharBuffer> buffer) |
Optional<CharBuffer> |
get()
Returns the secret enclosed in a
CharBuffer . |
Optional<char[]> |
getAsArray()
Returns the secret in its
char[] form. |
public static VaultCharSecret forBuffer(Optional<CharBuffer> buffer)
public Optional<CharBuffer> get()
VaultCharSecret
CharBuffer
.get
in interface VaultCharSecret
Optional
containing the value returned
by the vault as a CharBuffer
(a valid value can be null
), or an empty Optional
public Optional<char[]> getAsArray()
VaultCharSecret
char[]
form.getAsArray
in interface VaultCharSecret
Optional
containing the value returned
by the vault as a char[]
(a valid value can be null
), or an empty Optional
.public void close()
VaultCharSecret
close
in interface AutoCloseable
close
in interface VaultCharSecret
Copyright © 2021 JBoss by Red Hat. All rights reserved.