Class Aria256
- Namespace
- CryptoHives.Foundation.Security.Cryptography.Cipher
- Assembly
- CryptoHives.Foundation.Security.Cryptography.dll
ARIA-256 symmetric cipher implementation.
public sealed class Aria256 : SymmetricCipher, IDisposable
- Inheritance
-
Aria256
- Implements
- Inherited Members
Remarks
ARIA-256 is the Korean national standard block cipher (KS X 1213) using a 256-bit key with 16 rounds of encryption.
Constructors
Aria256()
Initializes a new instance of the Aria256 class.
public Aria256()
Fields
KeySizeBits
Key size in bits for ARIA-256.
public const int KeySizeBits = 256
Field Value
KeySizeBytes
Key size in bytes for ARIA-256.
public const int KeySizeBytes = 32
Field Value
Properties
AlgorithmName
Gets the name of the cipher algorithm.
public override string AlgorithmName { get; }
Property Value
Examples
"AES-256", "ChaCha20", "AES-256-GCM"
IVSize
Gets the required IV/nonce size in bytes for the current mode.
public override int IVSize { get; }
Property Value
Methods
Create()
Creates a new instance of the Aria256 cipher.
public static Aria256 Create()
Returns
- Aria256
A new ARIA-256 cipher instance.
CreateCipherDecryptor(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Creates a decryptor transform using the specified key and IV.
protected override ICipherTransform CreateCipherDecryptor(ReadOnlySpan<byte> key, ReadOnlySpan<byte> iv)
Parameters
keyReadOnlySpan<byte>The secret key.
ivReadOnlySpan<byte>The initialization vector or nonce.
Returns
- ICipherTransform
A new cipher decryptor transform.
CreateCipherEncryptor(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Creates an encryptor transform using the specified key and IV.
protected override ICipherTransform CreateCipherEncryptor(ReadOnlySpan<byte> key, ReadOnlySpan<byte> iv)
Parameters
keyReadOnlySpan<byte>The secret key.
ivReadOnlySpan<byte>The initialization vector or nonce.
Returns
- ICipherTransform
A new cipher encryptor transform.