Class EnvelopeCrypto
java.lang.Object
com.helixframework.aws.encryption.EnvelopeCrypto
Utility for doing envelope encryption with AWS Encryption SDK.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic EnvelopeCrypto.Builderbuilder()Gets a builder for creating instances ofEnvelopeCrypto.byte[]decrypt(byte[] ciphertext) Decrypts the supplied ciphertext bytes.Decrypts the supplied ciphertext bytes.byte[]Decrypts the supplied ciphertext and verifies that the supplied encryption context matches the context with which the data was encrypted.Decrypts the supplied ciphertext and verifies that the supplied encryption context matches the context with which the data was encrypted.byte[]encrypt(byte[] plaintext) Encrypts the supplied plaintext data.Encrypts the supplied plaintext data.byte[]Encrypts the supplied plaintext data with encryption context.Encrypts the supplied plaintext data with encryption context.
-
Method Details
-
builder
Gets a builder for creating instances ofEnvelopeCrypto.- Returns:
- builder
-
encrypt
public byte[] encrypt(byte[] plaintext) Encrypts the supplied plaintext data.- Parameters:
plaintext- data to encrypt- Returns:
- encrypted data
-
encrypt
Encrypts the supplied plaintext data with encryption context.- Parameters:
context- encryption contextplaintext- data to encrypt- Returns:
- encrypted data
-
encrypt
Encrypts the supplied plaintext data.- Parameters:
plaintext- data to encrypt- Returns:
- encrypted data
-
encrypt
Encrypts the supplied plaintext data with encryption context.- Parameters:
context- encryption contextplaintext- data to encrypt- Returns:
- encrypted data
-
decrypt
public byte[] decrypt(byte[] ciphertext) Decrypts the supplied ciphertext bytes.- Parameters:
ciphertext- data to decrypt- Returns:
- decrypted data
-
decrypt
Decrypts the supplied ciphertext and verifies that the supplied encryption context matches the context with which the data was encrypted.- Parameters:
context- encryption contextciphertext- data to decrypt- Returns:
- decrypted data
-
decrypt
Decrypts the supplied ciphertext bytes.- Parameters:
ciphertext- data to decrypt- Returns:
- decrypted data
-
decrypt
Decrypts the supplied ciphertext and verifies that the supplied encryption context matches the context with which the data was encrypted.- Parameters:
context- encryption contextciphertext- data to decrypt- Returns:
- decrypted data
-