public class TransformPlaintext extends Object
VaultTransformContext
.
Plaintext is represented binary safe as byte[]
.Modifier and Type | Method and Description |
---|---|
String |
asString() |
String |
asString(Charset charset) |
static TransformPlaintext |
empty()
Factory method to create an empty
TransformPlaintext . |
boolean |
equals(Object o) |
VaultTransformContext |
getContext() |
byte[] |
getPlaintext() |
int |
hashCode() |
static TransformPlaintext |
of(byte[] plaintext)
Factory method to create
TransformPlaintext from a byte sequence. |
static TransformPlaintext |
of(String plaintext)
Factory method to create
TransformPlaintext using from String . |
static TransformPlaintext |
of(String plaintext,
Charset charset)
|
TransformPlaintext |
with(VaultTransformContext context)
Create a new
TransformPlaintext object from this plaintext associated with
the given VaultTransformContext . |
public static TransformPlaintext empty()
TransformPlaintext
.TransformPlaintext
object.public static TransformPlaintext of(byte[] plaintext)
TransformPlaintext
from a byte sequence.plaintext
- the plain text to encrypt, must not be null.TransformPlaintext
for plaintext
.public static TransformPlaintext of(String plaintext)
TransformPlaintext
using from String
.
String
is encoded to byte
using the default
Charset
.plaintext
- the plain text to encrypt, must not be null.TransformPlaintext
for plaintext
.public static TransformPlaintext of(String plaintext, Charset charset)
plaintext
- the plaintext to encrypt, must not be null.Plaintext
for plaintext
.public byte[] getPlaintext()
public VaultTransformContext getContext()
public TransformPlaintext with(VaultTransformContext context)
TransformPlaintext
object from this plaintext associated with
the given VaultTransformContext
.context
- transform context.TransformPlaintext
object.public String asString()
Copyright © 2016–2021 Pivotal Software, Inc.. All rights reserved.