mirror of
https://github.com/danbulant/jose
synced 2026-05-25 13:01:49 +00:00
7 lines
243 B
JavaScript
7 lines
243 B
JavaScript
import { JWEInvalid } from '../util/errors.js';
|
|
const checkCekLength = (cek, expected) => {
|
|
if (cek.length << 3 !== expected) {
|
|
throw new JWEInvalid('Invalid Content Encryption Key length');
|
|
}
|
|
};
|
|
export default checkCekLength;
|