Class TransformPlaintext
java.lang.Object
org.springframework.vault.support.TransformPlaintext
Value object representing plain text with an optional
VaultTransformContext
.
Plaintext is represented binary safe as byte[]
.- Since:
- 2.3
- Author:
- Lauren Voswinkel
-
Method Summary
Modifier and TypeMethodDescriptionasString()
static TransformPlaintext
empty()
Factory method to create an emptyTransformPlaintext
.boolean
byte[]
int
hashCode()
static TransformPlaintext
of
(byte[] plaintext) Factory method to createTransformPlaintext
from a byte sequence.static TransformPlaintext
Factory method to createTransformPlaintext
using fromString
.static TransformPlaintext
with
(VaultTransformContext context) Create a newTransformPlaintext
object from this plaintext associated with the givenVaultTransformContext
.
-
Method Details
-
empty
Factory method to create an emptyTransformPlaintext
.- Returns:
- the empty
TransformPlaintext
object.
-
of
Factory method to createTransformPlaintext
from a byte sequence.- Parameters:
plaintext
- the plain text to encrypt, must not be null.- Returns:
- the
TransformPlaintext
forplaintext
.
-
of
Factory method to createTransformPlaintext
using fromString
.String
is encoded tobyte
using the defaultCharset
.- Parameters:
plaintext
- the plain text to encrypt, must not be null.- Returns:
- the
TransformPlaintext
forplaintext
.
-
of
- Parameters:
plaintext
- the plaintext to encrypt, must not be null.- Returns:
- the
Plaintext
forplaintext
.
-
getPlaintext
public byte[] getPlaintext() -
getContext
-
with
Create a newTransformPlaintext
object from this plaintext associated with the givenVaultTransformContext
.- Parameters:
context
- transform context.- Returns:
- the new
TransformPlaintext
object.
-
asString
-
asString
-
equals
-
hashCode
public int hashCode()
-