@tbd54566975/crypto
Advanced tools
Comparing version 0.1.5 to 0.1.6-alpha-20230713-3f5d2c2
{ | ||
"name": "@tbd54566975/crypto", | ||
"version": "0.1.5", | ||
"version": "0.1.6-alpha-20230713-3f5d2c2", | ||
"description": "TBD crypto library", | ||
@@ -82,4 +82,7 @@ "type": "module", | ||
"dependencies": { | ||
"ed2curve": "0.3.0", | ||
"multiformats": "11.0.2" | ||
"@noble/ciphers": "0.1.3", | ||
"@noble/curves": "1.1.0", | ||
"@noble/hashes": "1.3.1", | ||
"@tbd54566975/common": "0.1.1", | ||
"ed2curve": "0.3.0" | ||
}, | ||
@@ -94,2 +97,3 @@ "devDependencies": { | ||
"@types/sinon": "10.0.15", | ||
"@types/uuid": "9.0.1", | ||
"@typescript-eslint/eslint-plugin": "5.59.0", | ||
@@ -117,6 +121,3 @@ "@typescript-eslint/parser": "5.59.0", | ||
"typescript": "5.0.4" | ||
}, | ||
"overrides": { | ||
"socket.io-parser@>4.0.4 <4.2.3": "4.2.3" | ||
} | ||
} |
@@ -5,3 +5,3 @@ import type { KeyPair, Jwk, PublicKeyJwk, PrivateKeyJwk, KeyPairJwk } from './types.js'; | ||
import ed2curve from 'ed2curve'; | ||
import { base64UrlToBytes, bytesToBase64Url } from './utils.js'; | ||
import { Convert } from '@tbd54566975/common'; | ||
@@ -34,6 +34,6 @@ // TODO: (not important) decide if we want to use tweetnacl or @noble/ed25519. is there a functional difference? | ||
const encodedPublicKey = bytesToBase64Url(keyPair.publicKey); | ||
const encodedPublicKey = Convert.uint8Array(keyPair.publicKey).toBase64Url(); | ||
const publicKeyJwk: PublicKeyJwk = { ...jwk, x: encodedPublicKey }; | ||
const encodedSecretKey = bytesToBase64Url(keyPair.privateKey); | ||
const encodedSecretKey = Convert.uint8Array(keyPair.privateKey).toBase64Url(); | ||
const privateKeyJwk: PrivateKeyJwk = { ...publicKeyJwk, d: encodedSecretKey }; | ||
@@ -53,3 +53,3 @@ | ||
const { payload, privateKeyJwk } = options; | ||
const privateKeyBytes = base64UrlToBytes(privateKeyJwk.d); | ||
const privateKeyBytes = Convert.base64Url(privateKeyJwk.d).toUint8Array(); | ||
@@ -76,3 +76,3 @@ if (privateKeyJwk.crv !== 'Ed25519') { | ||
const { signature, payload, publicKeyJwk } = options; | ||
const publicKeyBytes = base64UrlToBytes(publicKeyJwk.x); | ||
const publicKeyBytes = Convert.base64Url(publicKeyJwk.x).toUint8Array(); | ||
@@ -79,0 +79,0 @@ if (publicKeyJwk.crv !== 'Ed25519') { |
@@ -1,4 +0,11 @@ | ||
export * from './types.js'; | ||
export type * from './types.js'; | ||
export * as ed25519 from './ed25519.js'; | ||
export * as ed25519 from './ed25519.js'; | ||
export * as utils from './utils.js'; | ||
export type * from './types/index.js'; | ||
export * from './utils-new.js'; | ||
export * from './kms-local/index.js'; | ||
export * from './key-manager/index.js'; | ||
export * from './algorithms-api/index.js'; | ||
export * from './crypto-algorithms/index.js'; | ||
export * from './crypto-primitives/index.js'; |
Sorry, the diff of this file is too big to display
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
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9714373
134
23883
5
30
7
+ Added@noble/ciphers@0.1.3
+ Added@noble/curves@1.1.0
+ Added@noble/hashes@1.3.1
+ Added@tbd54566975/common@0.1.1
+ Added@noble/ciphers@0.1.3(transitive)
+ Added@noble/curves@1.1.0(transitive)
+ Added@noble/hashes@1.3.1(transitive)
+ Added@tbd54566975/common@0.1.1(transitive)
- Removedmultiformats@11.0.2
- Removedmultiformats@11.0.2(transitive)