Class StandardByteBufferCipherFactory
java.lang.Object
com.exceptionfactory.jagged.framework.crypto.StandardByteBufferCipherFactory
- All Implemented Interfaces:
ByteBufferCipherFactory
public final class StandardByteBufferCipherFactory
extends Object
implements ByteBufferCipherFactory
Standard implementation of Byte Buffer Cipher Factory provides instances of Byte Buffer Decryptor and Encryptor objects
-
Constructor Summary
ConstructorsConstructorDescriptionStandard Byte Buffer Cipher Factory constructor using default Security Provider configurationStandardByteBufferCipherFactory(Provider provider) Standard Byte Buffer Cipher Factory constructor using specified Security Provider configuration -
Method Summary
Modifier and TypeMethodDescriptionnewByteBufferDecryptor(CipherKey cipherKey, IvParameterSpec parameterSpec) Create new instance of Byte Buffer Decryptor using provided Key and Initialization VectornewByteBufferEncryptor(CipherKey cipherKey, IvParameterSpec parameterSpec) Create new instance of Byte Buffer Encryptor using provided Key and Initialization Vector
-
Constructor Details
-
StandardByteBufferCipherFactory
public StandardByteBufferCipherFactory()Standard Byte Buffer Cipher Factory constructor using default Security Provider configuration -
StandardByteBufferCipherFactory
Standard Byte Buffer Cipher Factory constructor using specified Security Provider configuration- Parameters:
provider- Security Provider supporting ChaCha20-Poly1305
-
-
Method Details
-
newByteBufferDecryptor
public ByteBufferDecryptor newByteBufferDecryptor(CipherKey cipherKey, IvParameterSpec parameterSpec) throws GeneralSecurityException Create new instance of Byte Buffer Decryptor using provided Key and Initialization Vector- Specified by:
newByteBufferDecryptorin interfaceByteBufferCipherFactory- Parameters:
cipherKey- Cipher Key requiredparameterSpec- Initialization Vector parameter specification required- Returns:
- Byte Buffer Decryptor
- Throws:
GeneralSecurityException- Thrown on decryptor initialization failures
-
newByteBufferEncryptor
public ByteBufferEncryptor newByteBufferEncryptor(CipherKey cipherKey, IvParameterSpec parameterSpec) throws GeneralSecurityException Create new instance of Byte Buffer Encryptor using provided Key and Initialization Vector- Specified by:
newByteBufferEncryptorin interfaceByteBufferCipherFactory- Parameters:
cipherKey- Cipher Key requiredparameterSpec- Initialization Vector parameter specification required- Returns:
- Byte Buffer Encryptor
- Throws:
GeneralSecurityException- Thrown on encryptor initialization failures
-