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