AuthenticatedEncryptionProvider.GetKeyBytes(SecurityKey) Method
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()
- key
- SecurityKey
The SecurityKey that will be used to obtain the byte[].
Byte[] that is used to populated the KeyedHashAlgorithm.
Thrown if key
is null.
Thrown if a byte[] can not be obtained from SecurityKey.
SymmetricSecurityKey and JsonWebKey are supported.
For a SymmetricSecurityKey, Key is returned
For a JsonWebKey, DecodeBytes(String) is called with K if Kty == JsonWebAlgorithmsKeyTypes.Octet.