The crypto module provides access to common cryptographic algorithms.

Example:

import * as ccfcrypto from '@microsoft/ccf-app/crypto.js';

const key = ccfcrypto.generateAesKey(128);

Functions

digest
eddsaJwkToPem
eddsaPemToJwk
generateAesKey
generateEcdsaKeyPair
generateEddsaKeyPair
generateRsaKeyPair
isValidX509CertBundle
isValidX509CertChain
jwkToPem
pemToJwk
pubEddsaJwkToPem
pubEddsaPemToJwk
pubJwkToPem
pubPemToJwk
pubRsaJwkToPem
pubRsaPemToJwk
rsaJwkToPem
rsaPemToJwk
sign
unwrapKey
verifySignature
wrapKey

References

AesKwpParams → AesKwpParams
CryptoKeyPair → CryptoKeyPair
DigestAlgorithm → DigestAlgorithm
RsaOaepAesKwpParams → RsaOaepAesKwpParams
RsaOaepParams → RsaOaepParams
SigningAlgorithm → SigningAlgorithm
WrapAlgoParams → WrapAlgoParams