AuthenticatedEncryptionProvider.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
The SecurityKey that will be used to obtain the byte[].
Returns
Byte[] that is used to populated the KeyedHashAlgorithm.
Exceptions
Thrown if key
is null.
Thrown if a byte[] can not be obtained from SecurityKey.
Remarks
SymmetricSecurityKey and JsonWebKey are supported.
For a SymmetricSecurityKey, Key is returned
For a JsonWebKey, DecodeBytes(String) is called with K if Kty == JsonWebAlgorithmsKeyTypes.Octet.
Applies to
Обратная связь
https://aka.ms/ContentUserFeedback.
Ожидается в ближайшее время: в течение 2024 года мы постепенно откажемся от GitHub Issues как механизма обратной связи для контента и заменим его новой системой обратной связи. Дополнительные сведения см. в разделеОтправить и просмотреть отзыв по