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. |
boolean |
equals(Object o) |
VaultTransitContext |
getContext() |
byte[] |
getPlaintext() |
int |
hashCode() |
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.public String asString()
Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.