mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
12 lines
363 B
JavaScript
12 lines
363 B
JavaScript
import test from 'ava'
|
|
|
|
const { default: checkIvLength } = await import('#dist/lib/check_iv_length')
|
|
|
|
test('lib/check_iv_length.ts', (t) => {
|
|
t.throws(() => checkIvLength('A256GCM', new Uint8Array(13)), {
|
|
code: 'ERR_JWE_INVALID',
|
|
message: 'Invalid Initialization Vector length',
|
|
})
|
|
t.notThrows(() => checkIvLength('A256GCM', new Uint8Array(12)))
|
|
})
|