UNPKG
workcraft-js
Version:
latest (2.0.2)
2.0.2
2.0.1
2.0.0
1.1.0
1.0.0
0.5.20
0.5.18
0.5.16
0.5.15
0.5.14
0.5.11
0.5.10
0.5.9
0.5.8
0.5.7
Node module for Workcraft Workers
workcraft-js
/
tests
/
node_modules
/
jose
/
dist
/
node
/
esm
/
lib
/
check_p2s.js
7 lines
(6 loc)
•
229 B
JavaScript
View Raw
1
2
3
4
5
6
7
import
{
JWEInvalid
}
from
'../util/errors.js'
;
export
default
function
checkP2s
(
p2s
) {
if
(!(p2s
instanceof
Uint8Array
) || p2s.
length
<
8
) {
throw
new
JWEInvalid
(
'PBES2 Salt Input must be 8 or more octets'
); } }