Skip to content

Commit 934342a

Browse files
committed
Fixed hex input for web testing tool (#12).
1 parent 884e1fe commit 934342a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ <h1>scrypt-js</h1>
184184
} else if (form.indexOf('NFKD') >= 0) {
185185
return new buffer.SlowBuffer(value.normalize('NFKD'), 'utf8');
186186
} else if (form.indexOf('hex') >= 0) {
187-
if (!value.match(/^[0-9A-F][0-9A-F]$/i)) {
187+
if (!value.match(/^([0-9A-F][0-9A-F])*$/i)) {
188188
throw new Error(field + ': invalid hex string');
189189
}
190190
return new buffer.SlowBuffer(value, 'hex');

0 commit comments

Comments
 (0)