Skip to content

Commit

Permalink
LibWeb: Define HmacKeyAlgorithm native accessor for length property
Browse files Browse the repository at this point in the history
The property was not accessible because it was not exposed to JS.

The issue was discovered while implementing `wrapKey` and `unwrapKey` in
the next commits.
  • Loading branch information
devgianlu authored and awesomekling committed Dec 16, 2024
1 parent 1e98fa9 commit a65110e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/LibWeb/Crypto/KeyAlgorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ void HmacKeyAlgorithm::initialize(JS::Realm& realm)
{
Base::initialize(realm);
define_native_accessor(realm, "hash", hash_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable);
define_native_accessor(realm, "length", length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable);
}

void HmacKeyAlgorithm::visit_edges(JS::Cell::Visitor& visitor)
Expand Down

0 comments on commit a65110e

Please sign in to comment.