new CryptoSuite_ECDSA_AES(keySize, hash)
constructor
Parameters:
Name | Type | Description |
---|---|---|
keySize |
number | Key size for the ECDSA algorithm, can only be 256 or 384 |
hash |
string | Optional. Hash algorithm, supported values are "SHA2" and "SHA3" |
Extends
Methods
-
decrypt()
-
This is an implementation of module:api.CryptoSuite#decrypt To be implemented.
- Overrides:
-
deriveKey()
-
This is an implementation of module:api.CryptoSuite#deriveKey To be implemented
- Overrides:
-
encrypt()
-
This is an implementation of module:api.CryptoSuite#encrypt To be implemented.
- Overrides:
-
generateEphemeralKey()
-
Generate an ephemeral key.
- Inherited From:
- Overrides:
Throws:
Will throw an error if not implementedReturns:
An instance of the Key class- Type
- module:api.Key
-
generateKey(opts)
-
Generate a key using the options in
opts
. If theopts.ephemeral
parameter is false, the method, in addition to returning the imported Key instance, also persists the generated key in the key store as PEM files that can be retrieved using thegetKey()
methodParameters:
Name Type Description opts
KeyOpts Optional - Inherited From:
- Overrides:
Throws:
Will throw an error if not implementedReturns:
Promise for an instance of the Key class- Type
- module:api.Key
-
getKey(ski)
-
Returns the Key this implementation associates to the Subject Key Identifier ski.
Parameters:
Name Type Description ski
string Subject Key Identifier specific to a Crypto Suite implementation, as the unique index to represent the key - Inherited From:
- Overrides:
Returns:
Promise of an instance of the Key class corresponding to the ski- Type
- module:api.Key
-
hash()
-
This is an implementation of module:api.CryptoSuite#hash The opts argument is not supported.
- Overrides:
-
importKey()
-
This is an implementation of module:api.CryptoSuite#importKey
- Overrides:
-
setCryptoKeyStore(cryptoKeyStore)
-
Set the cryptoKeyStore. When the application needs to use a key store other than the default, it should use the Client newCryptoKeyStore to create an instance and use this function to set the instance on the CryptoSuite.
Parameters:
Name Type Description cryptoKeyStore
CryptoKeyStore The cryptoKeyStore. - Overrides:
-
sign()
-
This is an implementation of module:api.CryptoSuite#sign Signs digest using key k.
- Overrides:
-
verify(key, signature, digest)
-
Verifies signature against key and digest
Parameters:
Name Type Description key
module:api.Key Signing verification key (public key) signature
Array.<byte> The signature to verify digest
Array.<byte> The digest that the signature was created for - Inherited From:
- Overrides:
Returns:
true if the signature verifies successfully- Type
- boolean