SymmetricSignatureProvider.GetKeyBytes(SecurityKey) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called to obtain the byte[] needed to create a KeyedHashAlgorithm
protected virtual byte[] GetKeyBytes (Microsoft.IdentityModel.Tokens.SecurityKey key);
abstract member GetKeyBytes : Microsoft.IdentityModel.Tokens.SecurityKey -> byte[]
override this.GetKeyBytes : Microsoft.IdentityModel.Tokens.SecurityKey -> byte[]
Protected Overridable Function GetKeyBytes (key As SecurityKey) As Byte()
Parameters
- key
- SecurityKey
SecurityKeythat will be used to obtain the byte[].
Returns
Byte[] that is used to populated the KeyedHashAlgorithm.
Exceptions
if key is null.
if a byte[] can not be obtained from SecurityKey.
Remarks
SymmetricSecurityKey and JsonWebKey are supported.
For a SymmetricSecurityKey .Key is returned
For a JsonWebKeyBase64UrlEncoder.DecodeBytes is called with K if Kty == JsonWebAlgorithmsKeyTypes.Octet
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈