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

@turnkey/webauthn-stamper

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turnkey/webauthn-stamper - npm Package Compare versions

Comparing version 0.4.3 to 0.5.0

10

./dist/index.js
'use strict';
var index = require('./webauthn-json/index.js');
var universal = require('./universal.js');
var sha256 = require('@noble/hashes/sha256');
var sha256Uint8array = require('sha256-uint8array');

@@ -48,7 +47,4 @@ /// <reference lib="dom" />

function getChallengeFromPayload(payload) {
const messageBuffer = new TextEncoder().encode(payload);
const hashBuffer = sha256.sha256(messageBuffer);
const hexString = universal.buffer.from(hashBuffer).toString("hex");
const hexBuffer = universal.buffer.from(hexString, "utf8");
return new Uint8Array(hexBuffer);
const hexString = sha256Uint8array.createHash().update(payload).digest("hex");
return new TextEncoder().encode(hexString);
}

@@ -55,0 +51,0 @@

# @turnkey/webauthn-stamper
## 0.5.0
### Minor Changes
- Remove dependency on `noble/hashes` and `Buffer` in favor of a minimal sha256 lib
- Introduce `@turnkey/encoding` to consolidate utility functions
## 0.4.3

@@ -4,0 +11,0 @@

'use strict';
var index = require('./webauthn-json/index.js');
var universal = require('./universal.js');
var sha256 = require('@noble/hashes/sha256');
var sha256Uint8array = require('sha256-uint8array');

@@ -48,7 +47,4 @@ /// <reference lib="dom" />

function getChallengeFromPayload(payload) {
const messageBuffer = new TextEncoder().encode(payload);
const hashBuffer = sha256.sha256(messageBuffer);
const hexString = universal.buffer.from(hashBuffer).toString("hex");
const hexBuffer = universal.buffer.from(hexString, "utf8");
return new Uint8Array(hexBuffer);
const hexString = sha256Uint8array.createHash().update(payload).digest("hex");
return new TextEncoder().encode(hexString);
}

@@ -55,0 +51,0 @@

{
"name": "@turnkey/webauthn-stamper",
"version": "0.4.3",
"version": "0.5.0",
"main": "./dist/index.js",

@@ -46,4 +46,3 @@ "module": "./dist/index.mjs",

"dependencies": {
"buffer": "^6.0.3",
"@noble/hashes": "^1.3.2"
"sha256-uint8array": "^0.10.7"
},

@@ -50,0 +49,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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