SymmetricAlgorithm
Represents a symmetric encryption algorithm. Symmetric algorithms use the same key for both encryption and decryption.
Extends
BaseCryptoClass
Properties
AES128
readonly
static
AES128:"Aes128"
='Aes128'
Constant representing the AES-128 algorithm. AES-128 uses a 128-bit key length.
AES256
readonly
static
AES256:"Aes256"
='Aes256'
Constant representing the AES-256 algorithm. AES-256 uses a 256-bit key length.
Accessors
blockSize
Get Signature
get blockSize():
number
Get the block size of the symmetric algorithm. The block size is the number of bits that the algorithm processes at a time.
Returns
number
The block size in bytes (e.g., 16 for AES, which has a 128-bit block size).
keyLength
Get Signature
get keyLength():
number
Get the key length of the symmetric algorithm.
Throws
InvalidArgumentError If the key length is unsupported.
Returns
number
The key length in bits (e.g., 128 for AES-128, 256 for AES-256).
name
Get Signature
get name():
string
Get the name of the symmetric algorithm.
Returns
string
The name of the algorithm.
Last updated: Sep 30, 2025