UEA-Prodem
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
import { JWEInvalid } from '../util/errors.js';
|
||||
import { bitLength } from './iv.js';
|
||||
export function checkIvLength(enc, iv) {
|
||||
if (iv.length << 3 !== bitLength(enc)) {
|
||||
throw new JWEInvalid('Invalid Initialization Vector length');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user