node:crypto: implement hkdf and hkdfSync (#18312)

This commit is contained in:
Dylan Conway
2025-03-21 01:03:01 -07:00
committed by GitHub
parent 2aeff10a85
commit a3585ff961
56 changed files with 1185 additions and 429 deletions

View File

@@ -1046,6 +1046,13 @@ JSC::EncodedJSValue CRYPTO_INVALID_KEYTYPE(JSC::ThrowScope& throwScope, JSC::JSG
return {};
}
JSC::EncodedJSValue CRYPTO_INVALID_KEYLEN(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject)
{
auto message = "Invalid key length"_s;
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_CRYPTO_INVALID_KEYLEN, message));
return {};
}
JSC::EncodedJSValue CRYPTO_OPERATION_FAILED(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, ASCIILiteral message)
{
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_CRYPTO_OPERATION_FAILED, message));