mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibWeb: Implement SubtleCrypto.generateKey for RSA-OAEP
This patch implements and tests window.crypto.sublte.generateKey with an RSA-OAEP algorithm. In order for the types to be happy, the KeyAlgorithms objects are moved to their own .h/.cpp pair, and the new KeyAlgorithms for RSA are added there.
This commit is contained in:
parent
008c89edde
commit
a9d240c647
12 changed files with 536 additions and 81 deletions
|
@ -0,0 +1,15 @@
|
|||
generateKey with RSA-OAEP algorithm
|
||||
publicKey: [object CryptoKey]
|
||||
publicKey algorithm: {"name":"RSA-OAEP","modulusLength":512,"publicExponent":{"0":0,"1":1,"2":0},"hash":"SHA-256"}
|
||||
publicKey type: public
|
||||
publicKey extractable: true
|
||||
publicKey usages: encrypt,wrapKey
|
||||
privateKey: [object CryptoKey]
|
||||
privateKey algorithm: {"name":"RSA-OAEP","modulusLength":512,"publicExponent":{"0":0,"1":1,"2":0},"hash":"SHA-256"}
|
||||
privateKey type: private
|
||||
privateKey extractable: true
|
||||
privateKey usages: decrypt,unwrapKey
|
||||
invalid usages throw
|
||||
Error: [object DOMException]
|
||||
no usages for private key throws
|
||||
Error: [object DOMException]
|
Loading…
Add table
Add a link
Reference in a new issue