allow only printable ASCII characters in flag strings
parent
1eabc67732
commit
470a92264d
|
@ -30,6 +30,8 @@
|
|||
return null;
|
||||
for (i in s) {
|
||||
var c = s.charCodeAt(i);
|
||||
if (c < 32 || c > 126)
|
||||
return null;
|
||||
h += c.toString(16).padStart(2, "0");
|
||||
}
|
||||
return "0x" + new BN(keccak256(h).slice(2), 16).mod(secp256k1n).toString(16).padStart(64, 0);
|
||||
|
|
Loading…
Reference in New Issue