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

@tbd54566975/crypto

Package Overview
Dependencies
Maintainers
10
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tbd54566975/crypto - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6-alpha-20230713-d1dda95

dist/types/algorithms-api/aes/base.d.ts

13

package.json
{
"name": "@tbd54566975/crypto",
"version": "0.1.5",
"version": "0.1.6-alpha-20230713-d1dda95",
"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

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