Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix issue with non-strings

  • Loading branch information...
commit a1e98f68949faba3f04a0b35e44d4a580031d98b 1 parent 910081c
@pvorb authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  sha1.js
View
2  sha1.js
@@ -8,6 +8,8 @@
// Convert to byte array
if (message.constructor == String)
message = utf8.stringToBytes(message);
+ else if (!Array.isArray(message))
+ message = message.toString();
// otherwise assume byte array
var m = crypt.bytesToWords(message),
Please sign in to comment.
Something went wrong with that request. Please try again.