@eyhn/crypto
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -12,2 +12,3 @@ import pkcs1encrypt from "./pkcs1/encrypt"; | ||
import sha1 from "./sha1"; | ||
import sha256 from "./sha256"; | ||
declare const _default: { | ||
@@ -24,2 +25,3 @@ rsa: { | ||
sha1: typeof sha1; | ||
sha256: typeof sha256; | ||
tools: { | ||
@@ -26,0 +28,0 @@ hexToArrayBuffer: typeof hexToArrayBuffer; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "./pkcs1/encrypt", "./utils/hex", "./utils/text", "./pkcs1/padding", "./pkcs1/unpadding", "./pkcs1/dopublic", "./pkcs1/doprivate", "./pkcs1/generate", "./pkcs1/decrypt", "./bigint", "./sha1"], factory); | ||
define(["require", "exports", "./pkcs1/encrypt", "./utils/hex", "./utils/text", "./pkcs1/padding", "./pkcs1/unpadding", "./pkcs1/dopublic", "./pkcs1/doprivate", "./pkcs1/generate", "./pkcs1/decrypt", "./bigint", "./sha1", "./sha256"], factory); | ||
} | ||
@@ -23,2 +23,3 @@ })(function (require, exports) { | ||
const sha1_1 = require("./sha1"); | ||
const sha256_1 = require("./sha256"); | ||
return { | ||
@@ -35,2 +36,3 @@ rsa: { | ||
sha1: sha1_1.default, | ||
sha256: sha256_1.default, | ||
tools: { | ||
@@ -37,0 +39,0 @@ hexToArrayBuffer: hex_1.hexToArrayBuffer, |
{ | ||
"name": "@eyhn/crypto", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"main": "lib/index.js", | ||
@@ -21,4 +21,5 @@ "types": "lib/index.d.ts", | ||
"big-integer": "^1.6.43", | ||
"js-sha1": "^0.6.0" | ||
"js-sha1": "^0.6.0", | ||
"js-sha256": "^0.9.0" | ||
} | ||
} |
@@ -12,2 +12,3 @@ import pkcs1encrypt from "./pkcs1/encrypt"; | ||
import sha1 from "./sha1"; | ||
import sha256 from "./sha256"; | ||
@@ -25,2 +26,3 @@ export = { | ||
sha1: sha1, | ||
sha256: sha256, | ||
tools: { | ||
@@ -27,0 +29,0 @@ hexToArrayBuffer: hexToArrayBuffer, |
@@ -85,1 +85,9 @@ import crypto = require('../src/'); | ||
}); | ||
describe('sha256', () => { | ||
it('hash', () => { | ||
const hash = crypto.sha256(new Uint8Array([1,2,3])); | ||
expect(hash.byteLength).toBe(32); | ||
expect(hash).toMatchSnapshot(); | ||
}); | ||
}); |
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
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
197036
72
951
3
+ Addedjs-sha256@^0.9.0
+ Addedjs-sha256@0.9.0(transitive)