UNPKG

jose

Version:

Universal 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies

7 lines (6 loc) 229 B
import { JWEInvalid } from '../util/errors.js'; export default function checkP2s(p2s) { if (!(p2s instanceof Uint8Array) || p2s.length < 8) { throw new JWEInvalid('PBES2 Salt Input must be 8 or more octets'); } }