mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 23:01:58 +00:00
node:crypto: native Hmac and Hash (#17920)
This commit is contained in:
@@ -1051,7 +1051,7 @@ JSC::EncodedJSValue CRYPTO_INCOMPATIBLE_KEY_OPTIONS(JSC::ThrowScope& throwScope,
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC::EncodedJSValue CRYPTO_INVALID_DIGEST(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::String& digest)
|
||||
JSC::EncodedJSValue CRYPTO_INVALID_DIGEST(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::StringView& digest)
|
||||
{
|
||||
WTF::StringBuilder builder;
|
||||
builder.append("Invalid digest: "_s);
|
||||
@@ -1060,6 +1060,18 @@ JSC::EncodedJSValue CRYPTO_INVALID_DIGEST(JSC::ThrowScope& throwScope, JSC::JSGl
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC::EncodedJSValue CRYPTO_HASH_FINALIZED(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject)
|
||||
{
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_CRYPTO_HASH_FINALIZED, "Digest already called"_s));
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC::EncodedJSValue CRYPTO_HASH_UPDATE_FAILED(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject)
|
||||
{
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_CRYPTO_HASH_UPDATE_FAILED, "Hash update failed"_s));
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC::EncodedJSValue MISSING_PASSPHRASE(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, WTF::ASCIILiteral message)
|
||||
{
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_MISSING_PASSPHRASE, message));
|
||||
|
||||
Reference in New Issue
Block a user