@ethersproject/sha2
Advanced tools
Comparing version 5.0.0-beta.133 to 5.0.0-beta.134
@@ -1,1 +0,1 @@ | ||
export declare const version = "sha2/5.0.0-beta.133"; | ||
export declare const version = "sha2/5.0.0-beta.134"; |
@@ -1,1 +0,1 @@ | ||
export const version = "sha2/5.0.0-beta.133"; | ||
export const version = "sha2/5.0.0-beta.134"; |
import { BytesLike } from "@ethersproject/bytes"; | ||
export declare enum SupportedAlgorithms { | ||
export declare enum SupportedAlgorithm { | ||
sha256 = "sha256", | ||
@@ -9,2 +9,2 @@ sha512 = "sha512" | ||
export declare function sha512(data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithms, key: BytesLike, data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; |
@@ -7,7 +7,7 @@ "use strict"; | ||
const logger = new Logger(version); | ||
export var SupportedAlgorithms; | ||
(function (SupportedAlgorithms) { | ||
SupportedAlgorithms["sha256"] = "sha256"; | ||
SupportedAlgorithms["sha512"] = "sha512"; | ||
})(SupportedAlgorithms || (SupportedAlgorithms = {})); | ||
export var SupportedAlgorithm; | ||
(function (SupportedAlgorithm) { | ||
SupportedAlgorithm["sha256"] = "sha256"; | ||
SupportedAlgorithm["sha512"] = "sha512"; | ||
})(SupportedAlgorithm || (SupportedAlgorithm = {})); | ||
; | ||
@@ -24,3 +24,3 @@ export function ripemd160(data) { | ||
export function computeHmac(algorithm, key, data) { | ||
if (!SupportedAlgorithms[algorithm]) { | ||
if (!SupportedAlgorithm[algorithm]) { | ||
logger.throwError("unsupported algorithm " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -27,0 +27,0 @@ operation: "hmac", |
import { BytesLike } from '@ethersproject/bytes'; | ||
export declare enum SupportedAlgorithms { | ||
export declare enum SupportedAlgorithm { | ||
sha256 = "sha256", | ||
@@ -9,2 +9,2 @@ sha512 = "sha512" | ||
export declare function sha512(data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithms, key: BytesLike, data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; |
@@ -7,7 +7,7 @@ "use strict"; | ||
const logger = new Logger(version); | ||
export var SupportedAlgorithms; | ||
(function (SupportedAlgorithms) { | ||
SupportedAlgorithms["sha256"] = "sha256"; | ||
SupportedAlgorithms["sha512"] = "sha512"; | ||
})(SupportedAlgorithms || (SupportedAlgorithms = {})); | ||
export var SupportedAlgorithm; | ||
(function (SupportedAlgorithm) { | ||
SupportedAlgorithm["sha256"] = "sha256"; | ||
SupportedAlgorithm["sha512"] = "sha512"; | ||
})(SupportedAlgorithm || (SupportedAlgorithm = {})); | ||
; | ||
@@ -24,3 +24,3 @@ export function ripemd160(data) { | ||
export function computeHmac(algorithm, key, data) { | ||
if (!SupportedAlgorithms[algorithm]) { | ||
if (!SupportedAlgorithm[algorithm]) { | ||
logger.throwError("unsupported algorithm - " + algorithm, Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -27,0 +27,0 @@ operation: "computeHmac", |
@@ -1,1 +0,1 @@ | ||
export declare const version = "sha2/5.0.0-beta.133"; | ||
export declare const version = "sha2/5.0.0-beta.134"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = "sha2/5.0.0-beta.133"; | ||
exports.version = "sha2/5.0.0-beta.134"; |
import { BytesLike } from "@ethersproject/bytes"; | ||
export declare enum SupportedAlgorithms { | ||
export declare enum SupportedAlgorithm { | ||
sha256 = "sha256", | ||
@@ -9,2 +9,2 @@ sha512 = "sha512" | ||
export declare function sha512(data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithms, key: BytesLike, data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; |
@@ -15,7 +15,7 @@ "use strict"; | ||
var logger = new logger_1.Logger(_version_1.version); | ||
var SupportedAlgorithms; | ||
(function (SupportedAlgorithms) { | ||
SupportedAlgorithms["sha256"] = "sha256"; | ||
SupportedAlgorithms["sha512"] = "sha512"; | ||
})(SupportedAlgorithms = exports.SupportedAlgorithms || (exports.SupportedAlgorithms = {})); | ||
var SupportedAlgorithm; | ||
(function (SupportedAlgorithm) { | ||
SupportedAlgorithm["sha256"] = "sha256"; | ||
SupportedAlgorithm["sha512"] = "sha512"; | ||
})(SupportedAlgorithm = exports.SupportedAlgorithm || (exports.SupportedAlgorithm = {})); | ||
; | ||
@@ -35,3 +35,3 @@ function ripemd160(data) { | ||
function computeHmac(algorithm, key, data) { | ||
if (!SupportedAlgorithms[algorithm]) { | ||
if (!SupportedAlgorithm[algorithm]) { | ||
logger.throwError("unsupported algorithm " + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -38,0 +38,0 @@ operation: "hmac", |
import { BytesLike } from '@ethersproject/bytes'; | ||
export declare enum SupportedAlgorithms { | ||
export declare enum SupportedAlgorithm { | ||
sha256 = "sha256", | ||
@@ -9,2 +9,2 @@ sha512 = "sha512" | ||
export declare function sha512(data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithms, key: BytesLike, data: BytesLike): string; | ||
export declare function computeHmac(algorithm: SupportedAlgorithm, key: BytesLike, data: BytesLike): string; |
@@ -8,7 +8,7 @@ "use strict"; | ||
var logger = new logger_1.Logger(_version_1.version); | ||
var SupportedAlgorithms; | ||
(function (SupportedAlgorithms) { | ||
SupportedAlgorithms["sha256"] = "sha256"; | ||
SupportedAlgorithms["sha512"] = "sha512"; | ||
})(SupportedAlgorithms = exports.SupportedAlgorithms || (exports.SupportedAlgorithms = {})); | ||
var SupportedAlgorithm; | ||
(function (SupportedAlgorithm) { | ||
SupportedAlgorithm["sha256"] = "sha256"; | ||
SupportedAlgorithm["sha512"] = "sha512"; | ||
})(SupportedAlgorithm = exports.SupportedAlgorithm || (exports.SupportedAlgorithm = {})); | ||
; | ||
@@ -28,3 +28,3 @@ function ripemd160(data) { | ||
function computeHmac(algorithm, key, data) { | ||
if (!SupportedAlgorithms[algorithm]) { | ||
if (!SupportedAlgorithm[algorithm]) { | ||
logger.throwError("unsupported algorithm - " + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -31,0 +31,0 @@ operation: "computeHmac", |
@@ -29,5 +29,5 @@ { | ||
}, | ||
"tarballHash": "0xe451c587c6d3c247b8a1b3e0f10be6eb689c345ed60bcc33ce0ac263c5bce041", | ||
"tarballHash": "0x31e6321a49abc6e031310288ddab8b6b7fb5fa53899c264eecd28ca05cdbcf7a", | ||
"types": "./lib/index.d.ts", | ||
"version": "5.0.0-beta.133" | ||
"version": "5.0.0-beta.134" | ||
} |
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
10078