Method DecryptAESKey
DecryptAESKey(out Byte[], Byte[], Byte[], RSAParameters)
Decrypts the encrypted AES key (32bytes) by means of the preliminary document hash and a private RSA key.
Declaration
public Error DecryptAESKey(out byte[] aesKey, byte[] encryptedAesKey, byte[] preliminaryDocumentHash, RSAParameters rsaParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | aesKey | The decrypted key. |
System.Byte[] | encryptedAesKey | The encrypted AES key. |
System.Byte[] | preliminaryDocumentHash | The preliminary document hash |
System.Security.Cryptography.RSAParameters | rsaParameters | The parameters of the private RSA key. |
Returns
Type | Description |
---|---|
Error | Error |
Implements
Remarks
The key is decrypted in two steps:
1. The given encrypted AES key is RSA decrypted.
2. The result is AES decrypted with the preliminary document hash as decryption key.
DecryptAESKey(out Byte[], Byte[], Byte[], String)
Decrypts the encrypted AES key (32bytes) by means of the preliminary document hash and a private RSA key parsed from a PEM file
Declaration
public Error DecryptAESKey(out byte[] aesKey, byte[] encryptedAesKey, byte[] preliminaryDocumentHash, string path)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | aesKey | The decrypted key. |
System.Byte[] | encryptedAesKey | The encrypted AES key. |
System.Byte[] | preliminaryDocumentHash | The preliminary document hash. |
System.String | path |
Returns
Type | Description |
---|---|
Error | Error |
Implements
Remarks
The key is decrypted in two steps:
1. The given encrypted AES key is RSA decrypted.
2. The result is AES decrypted with the preliminary document hash as decryption key.
See DecryptAESKey(out Byte[], Byte[], Byte[], RSAParameters)