Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-webcrypto-ossl

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-webcrypto-ossl - npm Package Compare versions

Comparing version 1.0.34 to 1.0.35

4

buildjs/subtle.js

@@ -23,6 +23,6 @@ "use strict";

else if (ArrayBuffer.isView(ab)) {
return new Buffer(ab.buffer.slice(0, ab.byteLength));
return Buffer.from(ab.buffer, ab.byteOffset, ab.byteLength);
}
else {
return new Buffer(ab);
return Buffer.from(ab);
}

@@ -29,0 +29,0 @@ }

{
"name": "node-webcrypto-ossl",
"version": "1.0.34",
"version": "1.0.35",
"repository": {

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

@@ -44,3 +44,28 @@ "use strict";

});
context("Array", () => {
it("subarray", (done) => {
const data = new Uint8Array([116, 101, 115, 116, 1, 2, 3, 4, 5])
webcrypto.subtle.digest("SHA-256", data.subarray(0, 4))
.then(function (hash) {
assert.equal(Buffer.from(hash).toString("hex").toLowerCase(), vector.algs["SHA-256"]);
})
.then(done, done);
});
it("slice", (done) => {
const data = new Uint8Array([116, 101, 115, 116, 1, 2, 3, 4, 5])
webcrypto.subtle.digest("SHA-256", data.slice(0, 4))
.then(function (hash) {
assert.equal(Buffer.from(hash).toString("hex").toLowerCase(), vector.algs["SHA-256"]);
})
.then(done, done);
});
});
});
});
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc