ДК
Size: a a a
ДК
SY
SY
ДК
SY
ДК
ДК

УЮ

ДК
ДК
RSA-PSS/generateKey.ДК
ДК
УЮ
ДК
ДК
algorithm = {
name: 'RSA-PSS',
modulusLength: 256,
publicExponent: new Uint8Array([ 1, 0, 1 ]),
hash: 'SHA-1',
saltLength: 8,
}
crypto.subtle.generateKey(
algorithm,
true,
[ 'sign', 'verify' ],
)
.then( ({ privateKey })=> crypto.subtle.sign(
algorithm,
privateKey,
new Uint8Array([ 1, 0, 1 ]),
) )
.then( console.log, console.error )ДК
algorithm = {
name: 'RSA-PSS',
modulusLength: 256,
publicExponent: new Uint8Array([ 1, 0, 1 ]),
hash: 'SHA-256',
saltLength: 8,
}
crypto.subtle.generateKey(
algorithm,
true,
[ 'sign', 'verify' ],
)
.then( ({ privateKey })=> crypto.subtle.sign(
algorithm,
privateKey,
new Uint8Array([ 1, 0, 1 ]),
) )
.then( console.log, console.error )