Class HardwareSecurity.HardwareDataDecryptorFactory
- java.lang.Object
-
- org.pgpainless.decryption_verification.HardwareSecurity.HardwareDataDecryptorFactory
-
- All Implemented Interfaces:
org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory,org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory,CustomPublicKeyDataDecryptorFactory
- Enclosing class:
- HardwareSecurity
public static class HardwareSecurity.HardwareDataDecryptorFactory extends java.lang.Object implements CustomPublicKeyDataDecryptorFactory
Implementation ofPublicKeyDataDecryptorFactorywhich delegates decryption of encrypted session keys to aHardwareSecurity.DecryptionCallback. Users can provide such a callback to delegate decryption of messages to hardware security SDKs.
-
-
Constructor Summary
Constructors Constructor Description HardwareDataDecryptorFactory(SubkeyIdentifier subkeyIdentifier, HardwareSecurity.DecryptionCallback callback)Create a newHardwareSecurity.HardwareDataDecryptorFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.openpgp.operator.PGPDataDecryptorcreateDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)org.bouncycastle.openpgp.operator.PGPDataDecryptorcreateDataDecryptor(int aeadAlgorithm, byte[] iv, int chunkSize, int encAlgorithm, byte[] key)SubkeyIdentifiergetSubkeyIdentifier()byte[]recoverSessionData(int keyAlgorithm, byte[][] secKeyData)
-
-
-
Constructor Detail
-
HardwareDataDecryptorFactory
public HardwareDataDecryptorFactory(SubkeyIdentifier subkeyIdentifier, HardwareSecurity.DecryptionCallback callback)
Create a newHardwareSecurity.HardwareDataDecryptorFactory.- Parameters:
subkeyIdentifier- identifier of the decryption subkeycallback- decryption callback
-
-
Method Detail
-
recoverSessionData
public byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData) throws org.bouncycastle.openpgp.PGPException- Specified by:
recoverSessionDatain interfaceorg.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory- Throws:
org.bouncycastle.openpgp.PGPException
-
createDataDecryptor
public org.bouncycastle.openpgp.operator.PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key) throws org.bouncycastle.openpgp.PGPException- Specified by:
createDataDecryptorin interfaceorg.bouncycastle.openpgp.operator.PGPDataDecryptorFactory- Throws:
org.bouncycastle.openpgp.PGPException
-
createDataDecryptor
public org.bouncycastle.openpgp.operator.PGPDataDecryptor createDataDecryptor(int aeadAlgorithm, byte[] iv, int chunkSize, int encAlgorithm, byte[] key) throws org.bouncycastle.openpgp.PGPException- Specified by:
createDataDecryptorin interfaceorg.bouncycastle.openpgp.operator.PGPDataDecryptorFactory- Throws:
org.bouncycastle.openpgp.PGPException
-
getSubkeyIdentifier
public SubkeyIdentifier getSubkeyIdentifier()
- Specified by:
getSubkeyIdentifierin interfaceCustomPublicKeyDataDecryptorFactory
-
-