Constructors
new Crypto()
new Crypto():Crypto
Create a new instance of the Crypto class.
Initializes a new Crypto object. This constructor doesn’t take any
parameters as it sets up the internal state needed to perform cryptographic
operations. Each instance provides access to the full range of
cryptographic functionalities.
Returns
Crypto
Methods
getAsymmetricAlgorithmByName()
getAsymmetricAlgorithmByName(name): AsymmetricAlgorithm
Get an asymmetric algorithm by name.
This function retrieves an asymmetric algorithm by its name.
Parameters
name
string
The name of the asymmetric algorithm.
Returns
AsymmetricAlgorithm
The requested asymmetric algorithm.
Throws
InvalidArgumentError If the algorithm name is invalid.getDigestAlgorithmByName()
getDigestAlgorithmByName(name): DigestAlgorithm
Get a digest algorithm by name.
This function retrieves a digest algorithm based on its name.
If the algorithm with the given name is supported, it returns
the requested algorithm.
Parameters
name
string
The name of the algorithm.
Returns
DigestAlgorithm
The requested digest algorithm.

