Interface IOdfOpenPgpKeyProvider
Defines the IOdfOpenPgpKeyProvider contract. 定義 ODF 1.3 OpenPGP 加密模式所需的 Session Key 加解密提供者。
public interface IOdfOpenPgpKeyProvider
Methods
DecryptSessionKey(byte[], string)
以本地私鑰解密 Session Key。
byte[] DecryptSessionKey(byte[] encryptedKeyPacket, string keyId)
Parameters
Returns
- byte[]
解密後的明文 Session Key 位元組陣列;若無對應私鑰請拋出例外
EncryptSessionKey(byte[], OdfOpenPgpRecipient)
以指定收件人的 OpenPGP 公鑰加密 Session Key。
byte[] EncryptSessionKey(byte[] sessionKey, OdfOpenPgpRecipient recipient)
Parameters
sessionKeybyte[]明文 Session Key 位元組陣列(32 位元組 AES-256 金鑰)
recipientOdfOpenPgpRecipient收件人公鑰資訊
Returns
- byte[]
加密後的 Session Key 位元組陣列