ECDiffieHellmanCng.DeriveKeyTls 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用 TLS (传输层安全性) 1.1 PRF (Pseudo-Random 函数)执行密钥派生。
public:
override cli::array <System::Byte> ^ DeriveKeyTls(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, cli::array <System::Byte> ^ prfLabel, cli::array <System::Byte> ^ prfSeed);
public override byte[] DeriveKeyTls(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, byte[] prfLabel, byte[] prfSeed);
override this.DeriveKeyTls : System.Security.Cryptography.ECDiffieHellmanPublicKey * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyTls (otherPartyPublicKey As ECDiffieHellmanPublicKey, prfLabel As Byte(), prfSeed As Byte()) As Byte()
参数
- otherPartyPublicKey
- ECDiffieHellmanPublicKey
另一方的公钥。
- prfLabel
- Byte[]
ASCII 编码的 PRF 标签。
- prfSeed
- Byte[]
64 字节 PRF 种子。
返回
Byte[]
TLS 1.1 PRF 中的前 48 个字节,使用共享机密作为密钥。
例外
派生类必须重写此方法。
使用的 otherPartyPublicKey 曲线的大小与此键中的曲线不同。
otherPartyPublicKey或 prfLabelprfSeed 为 null。