Socket
Socket
Sign inDemoInstall

@dxos/crypto

Package Overview
Dependencies
Maintainers
9
Versions
3003
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/crypto - npm Package Compare versions

Comparing version 1.0.5 to 1.0.7-alpha.0

14

CHANGELOG.md
# Changelog
### [1.0.7](https://www.github.com/dxos/crypto/compare/v1.0.6...v1.0.7) (2020-12-08)
### Bug Fixes
* Trigger publish ([88471f1](https://www.github.com/dxos/crypto/commit/88471f1965dac5e5dc2b71d3209a03abfd5f294f))
### [1.0.6](https://www.github.com/dxos/crypto/compare/v1.0.5...v1.0.6) (2020-12-07)
### Bug Fixes
* Trigger publish ([eaa0183](https://www.github.com/dxos/crypto/commit/eaa018382aa2617607a5381498e3985829b08d6b))
### [1.0.5](https://www.github.com/dxos/crypto/compare/v1.0.4...v1.0.5) (2020-11-11)

@@ -4,0 +18,0 @@

3

dist/es/keys.d.ts
/// <reference types="node" />
import { PublicKeyLike } from './public-key';
export declare const hasher: any;

@@ -11,3 +12,3 @@ export declare const PUBLIC_KEY_LENGTH = 32;

export declare const createKeyPair: (seed?: Buffer | undefined) => KeyPair;
export declare const discoveryKey: (key: Buffer | Uint8Array) => Buffer;
export declare const discoveryKey: (key: PublicKeyLike) => Buffer;
/**

@@ -14,0 +15,0 @@ * @param {string} str - Hex string representation of key.

@@ -13,2 +13,3 @@ "use strict";

const hypercore_crypto_1 = __importDefault(require("hypercore-crypto"));
const public_key_1 = require("./public-key");
exports.hasher = new humanhash_1.default();

@@ -19,3 +20,3 @@ exports.PUBLIC_KEY_LENGTH = 32;

exports.createKeyPair = (seed) => hypercore_crypto_1.default.keyPair(seed);
exports.discoveryKey = hypercore_crypto_1.default.discoveryKey;
exports.discoveryKey = (key) => hypercore_crypto_1.default.discoveryKey(public_key_1.PublicKey.from(key).asBuffer());
/**

@@ -22,0 +23,0 @@ * @param {string} str - Hex string representation of key.

@@ -17,2 +17,3 @@ /// <reference types="node" />

static fromHex(hex: string): PublicKey;
static random(): PublicKey;
/**

@@ -19,0 +20,0 @@ * Tests if provided values is an instance of PublicKey.

@@ -11,2 +11,3 @@ "use strict";

const humanhash_1 = __importDefault(require("humanhash"));
const hypercore_crypto_1 = __importDefault(require("hypercore-crypto"));
const util_1 = require("util");

@@ -52,2 +53,5 @@ class PublicKey {

}
static random() {
return PublicKey.from(hypercore_crypto_1.default.randomBytes(32));
}
/**

@@ -54,0 +58,0 @@ * Tests if provided values is an instance of PublicKey.

{
"name": "@dxos/crypto",
"version": "1.0.5",
"version": "1.0.7-alpha.0",
"description": "Basic crypto key utils",

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

@@ -9,2 +9,4 @@ //

import { PublicKey, PublicKeyLike } from './public-key';
export const hasher = new HumanHasher();

@@ -29,3 +31,3 @@

export const discoveryKey: (key: Buffer | Uint8Array) => Buffer = crypto.discoveryKey;
export const discoveryKey = (key: PublicKeyLike): Buffer => crypto.discoveryKey(PublicKey.from(key).asBuffer());

@@ -32,0 +34,0 @@ /**

@@ -6,2 +6,3 @@ //

import HumanHasher from 'humanhash';
import crypto from 'hypercore-crypto';
import { inspect } from 'util';

@@ -41,2 +42,6 @@

static random (): PublicKey {
return PublicKey.from(crypto.randomBytes(32));
}
/**

@@ -43,0 +48,0 @@ * Tests if provided values is an instance of PublicKey.

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