ton-crypto
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -1,3 +0,3 @@ | ||
export { sha256 } from './primitives/sha256'; | ||
export { sha512 } from './primitives/sha512'; | ||
export { sha256, sha256_sync } from './primitives/sha256'; | ||
export { sha512, sha512_sync } from './primitives/sha512'; | ||
export { pbkdf2_sha512 } from './primitives/pbkdf2_sha512'; | ||
@@ -4,0 +4,0 @@ export { hmac_sha512 } from './primitives/hmac_sha512'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.newSecurePassphrase = exports.newSecureWords = exports.signVerify = exports.sign = exports.keyPairFromSecretKey = exports.keyPairFromSeed = exports.openBox = exports.sealBox = exports.mnemonicWordList = exports.mnemonicToSeed = exports.mnemonicToWalletKey = exports.mnemonicToPrivateKey = exports.mnemonicValidate = exports.mnemonicNew = exports.getSecureRandomNumber = exports.getSecureRandomWords = exports.getSecureRandomBytes = exports.hmac_sha512 = exports.pbkdf2_sha512 = exports.sha512 = exports.sha256 = void 0; | ||
exports.newSecurePassphrase = exports.newSecureWords = exports.signVerify = exports.sign = exports.keyPairFromSecretKey = exports.keyPairFromSeed = exports.openBox = exports.sealBox = exports.mnemonicWordList = exports.mnemonicToSeed = exports.mnemonicToWalletKey = exports.mnemonicToPrivateKey = exports.mnemonicValidate = exports.mnemonicNew = exports.getSecureRandomNumber = exports.getSecureRandomWords = exports.getSecureRandomBytes = exports.hmac_sha512 = exports.pbkdf2_sha512 = exports.sha512_sync = exports.sha512 = exports.sha256_sync = exports.sha256 = void 0; | ||
var sha256_1 = require("./primitives/sha256"); | ||
Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha256_1.sha256; } }); | ||
Object.defineProperty(exports, "sha256_sync", { enumerable: true, get: function () { return sha256_1.sha256_sync; } }); | ||
var sha512_1 = require("./primitives/sha512"); | ||
Object.defineProperty(exports, "sha512", { enumerable: true, get: function () { return sha512_1.sha512; } }); | ||
Object.defineProperty(exports, "sha512_sync", { enumerable: true, get: function () { return sha512_1.sha512_sync; } }); | ||
var pbkdf2_sha512_1 = require("./primitives/pbkdf2_sha512"); | ||
@@ -9,0 +11,0 @@ Object.defineProperty(exports, "pbkdf2_sha512", { enumerable: true, get: function () { return pbkdf2_sha512_1.pbkdf2_sha512; } }); |
/// <reference types="node" /> | ||
export declare function sha256_sync(source: Buffer | string): Buffer; | ||
export declare function sha256_fallback(source: Buffer | string): Promise<Buffer>; | ||
export declare function sha256(source: Buffer | string): Promise<Buffer>; |
@@ -6,6 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sha256 = exports.sha256_fallback = void 0; | ||
exports.sha256 = exports.sha256_fallback = exports.sha256_sync = void 0; | ||
const jssha_1 = __importDefault(require("jssha")); | ||
const ton_crypto_primitives_1 = require("ton-crypto-primitives"); | ||
async function sha256_fallback(source) { | ||
function sha256_sync(source) { | ||
let src; | ||
@@ -23,2 +23,6 @@ if (typeof source === 'string') { | ||
} | ||
exports.sha256_sync = sha256_sync; | ||
async function sha256_fallback(source) { | ||
return sha256_sync(source); | ||
} | ||
exports.sha256_fallback = sha256_fallback; | ||
@@ -25,0 +29,0 @@ function sha256(source) { |
/// <reference types="node" /> | ||
export declare function sha512_sync(source: Buffer | string): Buffer; | ||
export declare function sha512_fallback(source: Buffer | string): Promise<Buffer>; | ||
export declare function sha512(source: Buffer | string): Promise<Buffer>; |
@@ -6,6 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sha512 = exports.sha512_fallback = void 0; | ||
exports.sha512 = exports.sha512_fallback = exports.sha512_sync = void 0; | ||
const jssha_1 = __importDefault(require("jssha")); | ||
const ton_crypto_primitives_1 = require("ton-crypto-primitives"); | ||
async function sha512_fallback(source) { | ||
function sha512_sync(source) { | ||
let src; | ||
@@ -23,2 +23,6 @@ if (typeof source === 'string') { | ||
} | ||
exports.sha512_sync = sha512_sync; | ||
async function sha512_fallback(source) { | ||
return sha512_sync(source); | ||
} | ||
exports.sha512_fallback = sha512_fallback; | ||
@@ -25,0 +29,0 @@ async function sha512(source) { |
{ | ||
"name": "ton-crypto", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"repository": "https://github.com/ex3ndr/ton-crypto.git", | ||
@@ -5,0 +5,0 @@ "author": "Steve Korshakov <steve@korshakov.com>", |
169806
8509