public class Plaintext extends Object
VaultTransitContext
.
Plaintext is represented binary safe as byte[]
.Modifier and Type | Method and Description |
---|---|
String |
asString() |
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 of(byte[] plaintext)
Plaintext
from a byte sequence.plaintext
- the plaintext to encrypt, must not be null or empty.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 or empty.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–2017 Pivotal Software, Inc.. All rights reserved.