We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 884e1fe commit 934342aCopy full SHA for 934342a
index.html
@@ -184,7 +184,7 @@ <h1>scrypt-js</h1>
184
} else if (form.indexOf('NFKD') >= 0) {
185
return new buffer.SlowBuffer(value.normalize('NFKD'), 'utf8');
186
} else if (form.indexOf('hex') >= 0) {
187
- if (!value.match(/^[0-9A-F][0-9A-F]$/i)) {
+ if (!value.match(/^([0-9A-F][0-9A-F])*$/i)) {
188
throw new Error(field + ': invalid hex string');
189
}
190
return new buffer.SlowBuffer(value, 'hex');
0 commit comments