use hash param in rsa key gen with webkit subtle
This commit is contained in:
parent
0fadd8e188
commit
b756d35b8f
|
@ -153,7 +153,10 @@ export default function RSA() {
|
||||||
keyGenOpt = {
|
keyGenOpt = {
|
||||||
name: 'RSA-OAEP',
|
name: 'RSA-OAEP',
|
||||||
modulusLength: B, // the specified keysize in bits
|
modulusLength: B, // the specified keysize in bits
|
||||||
publicExponent: Euint8.subarray(0, 3) // take three bytes (max 65537)
|
publicExponent: Euint8.subarray(0, 3), // take three bytes (max 65537)
|
||||||
|
hash: {
|
||||||
|
name: 'SHA-1' // not required for actual RSA keys, but for crypto api 'sign' and 'verify'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
keys = webCrypto.generateKey(keyGenOpt, true, ['encrypt', 'decrypt']);
|
keys = webCrypto.generateKey(keyGenOpt, true, ['encrypt', 'decrypt']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user