

const require_KeyManagementAlgorithmNotSupportedError = require('../error/KeyManagementAlgorithmNotSupportedError.js');

//#region src/modules/kms/jwk/assertSupported.ts
function assertSupportedKeyAgreementAlgorithm(keyAgreement, supportedAlgorithms, backend) {
	if (!supportedAlgorithms.includes(keyAgreement.algorithm)) throw new require_KeyManagementAlgorithmNotSupportedError.KeyManagementAlgorithmNotSupportedError(`JWA key agreement algorithm '${keyAgreement.algorithm}'`, backend);
}
function assertSupportedEncryptionAlgorithm(encryption, supportedAlgorithms, backend) {
	if (!supportedAlgorithms.includes(encryption.algorithm)) throw new require_KeyManagementAlgorithmNotSupportedError.KeyManagementAlgorithmNotSupportedError(`JWA encryption algorithm '${encryption.algorithm}'`, backend);
}

//#endregion
exports.assertSupportedEncryptionAlgorithm = assertSupportedEncryptionAlgorithm;
exports.assertSupportedKeyAgreementAlgorithm = assertSupportedKeyAgreementAlgorithm;