check_p2s.js 333 B

123456789
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const errors_js_1 = require("../util/errors.js");
  4. function checkP2s(p2s) {
  5. if (!(p2s instanceof Uint8Array) || p2s.length < 8) {
  6. throw new errors_js_1.JWEInvalid('PBES2 Salt Input must be 8 or more octets');
  7. }
  8. }
  9. exports.default = checkP2s;