UNPKG
@authing/jose
Version:
beta (1.0.2-beta.4)
latest (1.0.2-beta)
1.0.5
1.0.4
1.0.3
1.0.2
1.0.2-beta.4
1.0.2-beta.2
1.0.2-beta
1.0.1
1.0.0
Webpack v4 compatible version of panva/jose v3.x
@authing/jose
/
dist
/
browser
/
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'
); } }