Class LegacyFullHybridEncrypt
- java.lang.Object
-
- com.google.crypto.tink.hybrid.internal.LegacyFullHybridEncrypt
-
- All Implemented Interfaces:
HybridEncrypt
@Immutable public final class LegacyFullHybridEncrypt extends java.lang.Object implements HybridEncrypt
Takes an arbitrary raw HybridEncrypt and makes it a full primitive. This is a class that helps us transition onto the new Keys and Configurations interface, by bringing potential user-defined primitives to a common denominator with our primitives over which we have control.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HybridEncryptcreate(LegacyProtoKey key)This method covers the cases where users created their own aead/key classes.byte[]encrypt(byte[] plaintext, byte[] contextInfo)Encryption operation: encryptsplaintextbindingcontextInfoto the resulting ciphertext.
-
-
-
Method Detail
-
create
public static HybridEncrypt create(LegacyProtoKey key) throws java.security.GeneralSecurityException
This method covers the cases where users created their own aead/key classes.- Throws:
java.security.GeneralSecurityException
-
encrypt
public byte[] encrypt(byte[] plaintext, byte[] contextInfo) throws java.security.GeneralSecurityExceptionDescription copied from interface:HybridEncryptEncryption operation: encryptsplaintextbindingcontextInfoto the resulting ciphertext.- Specified by:
encryptin interfaceHybridEncrypt- Returns:
- resulting ciphertext
- Throws:
java.security.GeneralSecurityException
-
-