@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
15 lines (11 loc) • 842 B
JavaScript
import { KeyManagementAlgorithmNotSupportedError } from "../error/KeyManagementAlgorithmNotSupportedError.mjs";
//#region src/modules/kms/jwk/assertSupported.ts
function assertSupportedKeyAgreementAlgorithm(keyAgreement, supportedAlgorithms, backend) {
if (!supportedAlgorithms.includes(keyAgreement.algorithm)) throw new KeyManagementAlgorithmNotSupportedError(`JWA key agreement algorithm '${keyAgreement.algorithm}'`, backend);
}
function assertSupportedEncryptionAlgorithm(encryption, supportedAlgorithms, backend) {
if (!supportedAlgorithms.includes(encryption.algorithm)) throw new KeyManagementAlgorithmNotSupportedError(`JWA encryption algorithm '${encryption.algorithm}'`, backend);
}
//#endregion
export { assertSupportedEncryptionAlgorithm, assertSupportedKeyAgreementAlgorithm };
//# sourceMappingURL=assertSupported.mjs.map