deno.land / x / jose@v5.2.4 / lib / check_iv_length.ts

check_iv_length.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
import { JWEInvalid } from '../util/errors.ts'import { bitLength } from './iv.ts'
const checkIvLength = (enc: string, iv: Uint8Array) => { if (iv.length << 3 !== bitLength(enc)) { throw new JWEInvalid('Invalid Initialization Vector length') }}
export default checkIvLength
jose

Version Info

Tagged at
a month ago