You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 1. If the [[type]] internal slot of key is not "private", then throw an InvalidAccessError.
384
+
if (key->type() != Bindings::KeyType::Private)
385
+
returnWebIDL::InvalidAccessError::create(realm, "Key is not a private key"_fly_string);
386
+
387
+
// 2. Let label be the contents of the label member of normalizedAlgorithm or the empty octet string if the label member of normalizedAlgorithm is not present.
// 3. Perform the decryption operation defined in Section 7.1 of [RFC3447] with the key represented by key as the recipient's RSA private key,
391
+
// the contents of ciphertext as the ciphertext to be decrypted, C, and label as the label, L, and with the hash function specified by the hash attribute
392
+
// of the [[algorithm]] internal slot of key as the Hash option and MGF1 (defined in Section B.2.1 of [RFC3447]) as the MGF option.
393
+
394
+
// 4. If performing the operation results in an error, then throw an OperationError.
395
+
396
+
// 5. Let plaintext the value M that results from performing the operation.
397
+
// FIXME: Actually decrypt the data
398
+
auto plaintext = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(ciphertext));
399
+
400
+
// 6. Return the result of creating an ArrayBuffer containing plaintext.
0 commit comments