Package org.pgpainless.decryption_verification

# Interface HardwareSecurity.DecryptionCallback

Enclosing class:
  `HardwareSecurity`

public static interface HardwareSecurity.DecryptionCallback

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`decryptSessionKey(long keyId, int keyAlgorithm, byte[] sessionKeyData)`
Delegate decryption of a Public-Key-Encrypted-Session-Key (PKESK) to an external API for dealing with hardware security modules such as smartcards or TPMs.

## Method Details

### decryptSessionKey

byte[] decryptSessionKey(long keyId, int keyAlgorithm, byte[] sessionKeyData) throws HardwareSecurity.HardwareSecurityException
Delegate decryption of a Public-Key-Encrypted-Session-Key (PKESK) to an external API for dealing with hardware security modules such as smartcards or TPMs. If decryption fails for some reason, a subclass of the `HardwareSecurity.HardwareSecurityException` is thrown.

Parameters:
  `keyId` - id of the key
  `keyAlgorithm` - algorithm
  `sessionKeyData` - encrypted session key
Returns:
  decrypted session key
Throws:
  `HardwareSecurity.HardwareSecurityException` - exception