Package io.aether.crypto
Interface CryptoEngine
-
- All Superinterfaces:
CryptoProviderUnit,io.aether.utils.ToString
public interface CryptoEngine extends CryptoProviderUnit
Interface for an object that performs encryption and decryption with a stateful component, such as a nonce. Implementations of this interface will hold keys and other internal state necessary for the cryptographic process.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]decrypt(byte[] data)Decrypts the provided data.byte[]encrypt(byte[] data)Encrypts the provided data.static CryptoEngineof(CryptoEngine encoder, CryptoEngine decoder)-
Methods inherited from interface io.aether.crypto.CryptoProviderUnit
getCryptoProvider, getProviderName
-
-
-
-
Method Detail
-
encrypt
byte[] encrypt(byte[] data)
Encrypts the provided data.- Parameters:
data- The data to be encrypted.- Returns:
- The encrypted data.
-
decrypt
byte[] decrypt(byte[] data)
Decrypts the provided data.- Parameters:
data- The data to be decrypted.- Returns:
- The decrypted data.
-
of
static CryptoEngine of(CryptoEngine encoder, CryptoEngine decoder)
-
-