noble-hashes
Advanced tools
Comparing version 0.2.0 to 0.2.1
import { Hash, Input } from './utils'; | ||
export declare abstract class Sha2 extends Hash { | ||
export declare abstract class SHA2 extends Hash { | ||
readonly blockLen: number; | ||
@@ -4,0 +4,0 @@ outputLen: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Sha2 = void 0; | ||
exports.SHA2 = void 0; | ||
const utils_1 = require("./utils"); | ||
// Base SHA2 class (RFC 6234) | ||
class Sha2 extends utils_1.Hash { | ||
class SHA2 extends utils_1.Hash { | ||
constructor(blockLen, outputLen, padOffset, isLE) { | ||
@@ -90,2 +90,2 @@ super(); | ||
} | ||
exports.Sha2 = Sha2; | ||
exports.SHA2 = SHA2; |
@@ -1,3 +0,3 @@ | ||
import { Sha2 } from './_sha2'; | ||
export declare class RIPEMD160 extends Sha2 { | ||
import { SHA2 } from './_sha2'; | ||
export declare class RIPEMD160 extends SHA2 { | ||
private h0; | ||
@@ -4,0 +4,0 @@ private h1; |
@@ -43,3 +43,3 @@ "use strict"; | ||
const BUF = new Uint32Array(16); | ||
class RIPEMD160 extends _sha2_1.Sha2 { | ||
class RIPEMD160 extends _sha2_1.SHA2 { | ||
constructor() { | ||
@@ -46,0 +46,0 @@ super(64, 20, 8, true); |
@@ -30,3 +30,3 @@ "use strict"; | ||
const SHA256_W = new Uint32Array(64); | ||
class SHA256 extends _sha2_1.Sha2 { | ||
class SHA256 extends _sha2_1.SHA2 { | ||
constructor() { | ||
@@ -33,0 +33,0 @@ super(64, 32, 8, false); |
@@ -1,3 +0,3 @@ | ||
import { Sha2 } from './_sha2'; | ||
export declare class SHA512 extends Sha2 { | ||
import { SHA2 } from './_sha2'; | ||
export declare class SHA512 extends SHA2 { | ||
Ah: number; | ||
@@ -4,0 +4,0 @@ Al: number; |
@@ -53,3 +53,3 @@ "use strict"; | ||
const SHA512_W_L = new Uint32Array(80); | ||
class SHA512 extends _sha2_1.Sha2 { | ||
class SHA512 extends _sha2_1.SHA2 { | ||
constructor() { | ||
@@ -56,0 +56,0 @@ super(128, 64, 16, false); |
@@ -160,8 +160,5 @@ "use strict"; | ||
const webCrypto = typeof self === 'object' && 'crypto' in self ? self.crypto : undefined; | ||
// Silence webpack warnings | ||
const nodeRequire = typeof module !== 'undefined' && | ||
typeof module.require === 'function' && | ||
module.require.bind(module); | ||
const nodeRequire = typeof module !== 'undefined' && typeof require === 'function'; | ||
return { | ||
node: nodeRequire && !webCrypto ? nodeRequire('crypto') : undefined, | ||
node: nodeRequire && !webCrypto ? require('crypto') : undefined, | ||
web: webCrypto, | ||
@@ -168,0 +165,0 @@ }; |
{ | ||
"name": "noble-hashes", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Fast 0-dependency JS implementation of SHA2, SHA3, RIPEMD, BLAKE, HMAC, HKDF, PBKDF2, Scrypt", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
105029
2145