hwsecurity-openpgp / de.cotech.hw.openpgp.pairedkey / PairedDecryptor /
PairedDecryptor
open class PairedDecryptor
This use case class performs a “decrypt” operation on encrypted data, parametrized by a OpenPgpSecurityKey, PinProvider, and PairedSecurityKey.
PairedSecurityKey pairedSecurityKey = pairedSecurityTokenStorage.getPairedSecurityKey(keyInteractor.getSecurityKeyAid());
PairedDecryptor decryptor = PairedDecryptor(keyInteractor, pairedPinProvider, pairedSecurityToken);
byte[] encryptedSessionSecret = encryptedSessionStorage.getEncryptedSessionSecret(pairedSecurityToken.getSecurityKeyAid());
ByteSecret sessionSecret = decryptor.decryptSessionSecret(encryptedSessionSecret);
This sessionSecret can be used for symmetric encryption operations, e.g. to encrypt a database.
See also
Name | Summary |
---|---|
de.cotech.hw.openpgp.pairedkey.PairedEncryptor |
Constructors
Name | Summary |
---|---|
PairedDecryptor | open fun PairedDecryptor(openPgpSecurityKey: OpenPgpSecurityKey, pinProvider: PinProvider, pairedSecurityKey: PairedSecurityKey)Create an instance parametrized with a OpenPgpSecurityKey, PinProvider, and PairedSecurityKey. |
Functions
Name | Summary |
---|---|
decryptSessionSecret |
open fun decryptSessionSecret(encryptedData: Array<Byte>): ByteSecret Decrypts data using the injected OpenPgpSecurityKey, PinProvider, and PairedSecurityKey. |