Socket
Socket
Sign inDemoInstall

@musakui/fedi

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

2

lib/hs/index.js

@@ -20,2 +20,3 @@ import { bufToB64, importPrivateKey, importPublicKey } from '../keys/index.js'

/** @type {import('./types').Hasher} */
const getDigest = async (data, algo = 'SHA-256') => {

@@ -96,2 +97,3 @@ const dg = await crypto.subtle.digest(algo, strToBuf(data))

mySigner = new Signer(id, key, { algorithm })
return mySigner
}

@@ -98,0 +100,0 @@

3

lib/hs/node.js

@@ -95,6 +95,7 @@ import { createSign, createVerify, createHash } from 'crypto'

* @param {string} key signing key
* @param {string} [algo] signing algorithm
* @param {string} [algo] digest algorithm
*/
export const useKey = (id, key, algo = 'sha256') => {
mySigner = new Signer(id, key, { hashAlgorithm: algo })
return mySigner
}

@@ -101,0 +102,0 @@

@@ -0,1 +1,3 @@

import { CoreSigner } from './core'
/**

@@ -36,5 +38,6 @@ * @param {string} data string to hash

/** signer instance */
signer: Signer
signer: CoreSigner
/** additional headers */
headers: Record<string, string>
}

@@ -10,3 +10,3 @@ {

"repository": "github:musakui/fedi",
"version": "0.1.0",
"version": "0.1.1",
"type": "module",

@@ -13,0 +13,0 @@ "files": [

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