Class Sm4Ccm
- Namespace
- CryptoHives.Foundation.Security.Cryptography.Cipher
- Assembly
- CryptoHives.Foundation.Security.Cryptography.dll
SM4-CCM authenticated encryption (SM4 per GB/T 32907-2016; the TLS 1.3 suite TLS_SM4_CCM_SM3 of RFC 8998).
public sealed class Sm4Ccm : CcmCipher, IAeadCipher, IDisposable
- Inheritance
-
Sm4Ccm
- Implements
- Inherited Members
Constructors
Sm4Ccm(ReadOnlySpan<byte>)
Initializes a new instance of the Sm4Ccm class.
public Sm4Ccm(ReadOnlySpan<byte> key)
Parameters
keyReadOnlySpan<byte>The 16-byte SM4 key.
Exceptions
- ArgumentException
The key has the wrong length.
Properties
AlgorithmName
Gets the algorithm name.
public override string AlgorithmName { get; }
Property Value
Methods
Create(ReadOnlySpan<byte>)
Creates a new SM4-CCM instance.
public static Sm4Ccm Create(ReadOnlySpan<byte> key)
Parameters
keyReadOnlySpan<byte>The 16-byte SM4 key.
Returns
- Sm4Ccm
A new SM4-CCM instance.