9 lines
337 B
Plaintext
9 lines
337 B
Plaintext
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
exports.default = (key, alg) => {
|
||
|
const { modulusLength } = key.asymmetricKeyDetails;
|
||
|
if (typeof modulusLength !== 'number' || modulusLength < 2048) {
|
||
|
throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
|
||
|
}
|
||
|
};
|