mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
make the ECDSA JSON signature parsing more robust
also rename the format to "Raw JSON" as I will later introduce "JSON Web Signature"
This commit is contained in:
parent
7b54d9e873
commit
1fbc7e03f0
4 changed files with 70 additions and 19 deletions
|
@ -48,7 +48,7 @@ class ECDSASign extends Operation {
|
|||
value: [
|
||||
"ASN.1 HEX",
|
||||
"P1363 HEX",
|
||||
"JSON"
|
||||
"Raw JSON"
|
||||
]
|
||||
}
|
||||
];
|
||||
|
@ -86,7 +86,7 @@ class ECDSASign extends Operation {
|
|||
case "P1363 HEX":
|
||||
result = r.KJUR.crypto.ECDSA.asn1SigToConcatSig(signatureASN1Hex);
|
||||
break;
|
||||
case "JSON": {
|
||||
case "Raw JSON": {
|
||||
const signatureRS = r.KJUR.crypto.ECDSA.parseSigHexInHexRS(signatureASN1Hex);
|
||||
result = JSON.stringify(signatureRS);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue