Socket
Socket
Sign inDemoInstall

sha1

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.1.0

2

package.json

@@ -12,3 +12,3 @@ {

],
"version": "1.0.1",
"version": "1.1.0",
"repository": {

@@ -15,0 +15,0 @@ "type": "git",

@@ -11,4 +11,7 @@ (function() {

message = utf8.stringToBytes(message);
else if (typeof Buffer !== 'undefined' && typeof Buffer.isBuffer == 'function' && Buffer.isBuffer(message))
message = Array.prototype.slice.call(message, 0);
else if (!Array.isArray(message))
message = message.toString();
// otherwise assume byte array

@@ -15,0 +18,0 @@

@@ -18,2 +18,9 @@ var sha1 = require('./sha1.js');

});
it('should node.js Buffer', function() {
var buffer = new Buffer('hello, sha1', 'utf8');
assert.equal(sha1(buffer), sha1('hello, sha1'));
})
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc