Add HMAC regression tests for Decimal key parsing (#2680)

This commit is contained in:
alleria173 2026-07-21 18:25:12 +01:00 committed by GitHub
parent df545e62b9
commit 88a2dbab9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -722,6 +722,39 @@ TestRegister.addTests([
} }
] ]
}, },
{
name: "HMAC: Decimal key space-delimited matches Latin1 key (fromDecimal Auto delimiter regression)",
input: "Hello, World!",
expectedOutput: "9b641a008211bb0464a10899d5b37a24ab08ffcf839f5e74d17d99f856530957",
recipeConfig: [
{
"op": "HMAC",
"args": [{"option": "Decimal", "string": "65 65"}, "SHA256"]
}
]
},
{
name: "HMAC: Latin1 key matches space-delimited Decimal key (fromDecimal Auto delimiter regression)",
input: "Hello, World!",
expectedOutput: "9b641a008211bb0464a10899d5b37a24ab08ffcf839f5e74d17d99f856530957",
recipeConfig: [
{
"op": "HMAC",
"args": [{"option": "Latin1", "string": "AA"}, "SHA256"]
}
]
},
{
name: "HMAC: Decimal key comma-delimited matches Latin1 key (fromDecimal Auto delimiter regression)",
input: "Hello, World!",
expectedOutput: "9b641a008211bb0464a10899d5b37a24ab08ffcf839f5e74d17d99f856530957",
recipeConfig: [
{
"op": "HMAC",
"args": [{"option": "Decimal", "string": "65,65"}, "SHA256"]
}
]
},
{ {
name: "MD5: Complex bytes", name: "MD5: Complex bytes",
input: "10dc10e32010de10d010dc10d810d910d010e12e", input: "10dc10e32010de10d010dc10d810d910d010e12e",