Class HpkeEncrypt
- java.lang.Object
-
- com.google.crypto.tink.hybrid.internal.HpkeEncrypt
-
- All Implemented Interfaces:
HybridEncrypt
@Immutable public final class HpkeEncrypt extends java.lang.Object implements HybridEncrypt
Hybrid Public Key Encryption (HPKE) encryption.HPKE RFC: https://www.rfc-editor.org/rfc/rfc9180.html
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HybridEncryptcreate(HpkePublicKey key)byte[]encrypt(byte[] plaintext, byte[] contextInfo)Encryption operation: encryptsplaintextbindingcontextInfoto the resulting ciphertext.
-
-
-
Method Detail
-
create
public static HybridEncrypt create(HpkePublicKey key) throws java.security.GeneralSecurityException
- 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
-
-