mirror of
https://github.com/danbulant/jose
synced 2026-05-24 20:41:46 +00:00
BREAKING CHANGE: Revised, Promise-based API BREAKING CHANGE: No dependencies BREAKING CHANGE: Browser support (using [Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/)) BREAKING CHANGE: Support for verification using a remote JWKS endpoint BREAKING CHANGE: Experimental Node.js libuv thread pool based runtime (non-blocking 🎉)
7 lines
232 B
TypeScript
7 lines
232 B
TypeScript
import { JWEInvalid } from '../util/errors.js'
|
|
|
|
export default function checkP2s(p2s: Uint8Array) {
|
|
if (!(p2s instanceof Uint8Array) || p2s.length < 8) {
|
|
throw new JWEInvalid('PBES2 Salt Input must be 8 or more octets')
|
|
}
|
|
}
|