Socket
Socket
Sign inDemoInstall

@radixdlt/crypto

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radixdlt/crypto - npm Package Compare versions

Comparing version 2.1.10 to 2.1.11

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [2.1.11](https://github.com/radixdlt/radixdlt-javascript/compare/@radixdlt/crypto@2.1.10...@radixdlt/crypto@2.1.11) (2021-12-17)
**Note:** Version bump only for package @radixdlt/crypto
## [2.1.10](https://github.com/radixdlt/radixdlt-javascript/compare/@radixdlt/crypto@2.1.9...@radixdlt/crypto@2.1.10) (2021-12-09)

@@ -8,0 +16,0 @@

3

dist/encryption/_types.d.ts

@@ -18,3 +18,4 @@ /// <reference types="node" />

PLAINTEXT = 0,
ENCRYPTED = 1
ENCRYPTED = 1,
HEX = 30
}

@@ -21,0 +22,0 @@ export declare enum EncryptionScheme {

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

MessageType[MessageType["ENCRYPTED"] = 1] = "ENCRYPTED";
MessageType[MessageType["HEX"] = 30] = "HEX";
})(MessageType = exports.MessageType || (exports.MessageType = {}));

@@ -12,0 +13,0 @@ var EncryptionScheme;

@@ -12,6 +12,7 @@ /// <reference types="node" />

fromBuffer: (buf: Buffer) => Result<EncryptedMessageT | PlaintextMessageT, Error>;
plaintextToString: (plaintext: Buffer) => string;
plaintextToString: (plaintext: Buffer, startAt?: number) => string;
isPlaintext: (rawHex: string) => boolean;
isEncrypted: (rawHex: string) => boolean;
isHexEncoded: (rawHex: string) => boolean;
};
//# sourceMappingURL=message.d.ts.map

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

const isEncrypted = (rawHex) => parseInt(rawHex.slice(0, 2)) === _types_1.MessageType.ENCRYPTED;
const isHexEncoded = (rawHex) => parseInt(rawHex.slice(0, 2)) === _types_1.MessageType.HEX;
const __validateEncryptedMessageMaxLength = utils_1.validateMaxLength.bind(null, maxLengthEncryptedMessage, 'encryptedMessage');

@@ -48,3 +49,3 @@ const __validateEncryptedMessageMinLength = utils_1.validateMinLength.bind(null, minLengthEncryptedMessage, 'encryptedMessage');

});
const plaintextToString = (plaintext) => Buffer.from(plaintext.slice(2).toString('hex'), 'hex').toString('utf-8');
const plaintextToString = (plaintext, startAt = 2) => Buffer.from(plaintext.slice(startAt).toString('hex'), 'hex').toString('utf-8');
const fromBuffer = (buf) => (0, exports.__validateEncryptedMessageLength)(buf).andThen((buffer) => {

@@ -91,3 +92,4 @@ const readNextBuffer = (0, util_1.readBuffer)(buf);

isEncrypted,
isHexEncoded,
};
//# sourceMappingURL=message.js.map
{
"name": "@radixdlt/crypto",
"version": "2.1.10",
"version": "2.1.11",
"description": "Cryptographic primitives such as digests (hashing) and Elliptic Curve Cryptography (ECC) methods such as key generation, signing and verify.",

@@ -55,3 +55,3 @@ "keywords": [

},
"gitHead": "dd782c54763aa5947b7407be629e877ece54cbb7"
"gitHead": "04a32ef6470a082a6450dc5005fa5e56c8856afd"
}

@@ -23,2 +23,3 @@ import { Byte, SecureRandom } from '@radixdlt/util'

ENCRYPTED = 0x01,
HEX = 0x1e,
}

@@ -25,0 +26,0 @@

@@ -35,2 +35,5 @@ import {

const isHexEncoded = (rawHex: string) =>
parseInt(rawHex.slice(0, 2)) === MessageType.HEX
const __validateEncryptedMessageMaxLength: (

@@ -88,4 +91,6 @@ buffer: Buffer,

const plaintextToString = (plaintext: Buffer) =>
Buffer.from(plaintext.slice(2).toString('hex'), 'hex').toString('utf-8')
const plaintextToString = (plaintext: Buffer, startAt = 2) =>
Buffer.from(plaintext.slice(startAt).toString('hex'), 'hex').toString(
'utf-8',
)

@@ -156,2 +161,3 @@ const fromBuffer = (

isEncrypted,
isHexEncoded,
}

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