@aws-crypto/sha256-universal
Advanced tools
Comparing version 0.1.0 to 1.0.0-alpha.0
@@ -1,7 +0,7 @@ | ||
import { Hash, SourceData } from '@aws-sdk/types'; | ||
import { Hash, SourceData } from "@aws-sdk/types"; | ||
export declare class Sha256 implements Hash { | ||
private readonly hash; | ||
constructor(secret?: SourceData); | ||
update(data: SourceData, encoding?: 'utf8' | 'ascii' | 'latin1'): void; | ||
update(data: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; | ||
digest(): Promise<Uint8Array>; | ||
} |
@@ -8,3 +8,3 @@ "use strict"; | ||
if (supportsCryptoModule()) { | ||
this.hash = new hash_node_1.Hash('sha256', secret); | ||
this.hash = new hash_node_1.Hash("sha256", secret); | ||
} | ||
@@ -26,3 +26,3 @@ else { | ||
try { | ||
return !!require('crypto').createHash; | ||
return !!require("crypto").createHash; | ||
} | ||
@@ -29,0 +29,0 @@ catch (_a) { |
{ | ||
"name": "@aws-crypto/sha256-universal", | ||
"version": "0.1.0", | ||
"version": "1.0.0-alpha.0", | ||
"scripts": { | ||
@@ -9,26 +9,18 @@ "prepublishOnly": "tsc", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" | ||
}, | ||
"author": { | ||
"name": "AWS Crypto Tools Team", | ||
"email": "aws-cryptools@amazon.com", | ||
"url": "https://aws.amazon.com/javascript/" | ||
"url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" | ||
}, | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@aws-crypto/sha256-browser": "^0.1.0", | ||
"@aws-sdk/hash-node": "^0.1.0", | ||
"@aws-sdk/types": "^0.1.0", | ||
"@aws-crypto/sha256-browser": "^1.0.0-alpha.0", | ||
"@aws-sdk/hash-node": "^1.0.0-alpha.0", | ||
"@aws-sdk/types": "^1.0.0-alpha.0", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.1.4", | ||
"@types/mocha": "^5.2.5", | ||
"@types/node": "^7.0.12", | ||
"@types/sinon": "^5.0.2", | ||
"chai": "^4.1.2", | ||
"mocha": "^5.2.0", | ||
"nyc": "^13.0.1", | ||
"sinon": "^6.3.4", | ||
"ts-node": "^7.0.1", | ||
"typescript": "^3.0.1" | ||
}, | ||
"main": "./build/index.js", | ||
@@ -39,3 +31,4 @@ "types": "./build/index.d.ts", | ||
"crypto": false | ||
} | ||
}, | ||
"gitHead": "1aeaf55c8803ae537cc03fef3541dc8567983b9b" | ||
} |
@@ -1,2 +0,2 @@ | ||
# @aws/crypto-sha256-universal | ||
# @aws-crypto/crypto-sha256-universal | ||
@@ -8,3 +8,3 @@ A consistent interface for SHA256 across browsers and NodeJs | ||
``` | ||
import {Sha256} from '@aws/crypto-sha256-universal' | ||
import {Sha256} from '@aws-crypto/crypto-sha256-universal' | ||
@@ -11,0 +11,0 @@ const hash = new Sha256(); |
@@ -5,8 +5,3 @@ { | ||
"module": "commonjs", | ||
"lib": [ | ||
"dom", | ||
"es5", | ||
"es2015.promise", | ||
"es2015.collection" | ||
], | ||
"lib": ["dom", "es5", "es2015.promise", "es2015.collection"], | ||
"declaration": true, | ||
@@ -22,2 +17,2 @@ "sourceMap": true, | ||
"exclude": ["node_modules/**"] | ||
} | ||
} |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
17993
0
46613
9
79
0
0
+ Added@aws-crypto/ie11-detection@1.0.0(transitive)
+ Added@aws-crypto/sha256-browser@1.2.2(transitive)
+ Added@aws-crypto/sha256-js@1.2.2(transitive)
+ Added@aws-crypto/supports-web-crypto@1.0.0(transitive)
+ Added@aws-crypto/util@1.2.2(transitive)
+ Added@aws-sdk/hash-node@1.0.0-rc.10(transitive)
+ Added@aws-sdk/is-array-buffer@1.0.0-rc.8(transitive)
+ Added@aws-sdk/types@1.0.0-rc.103.709.0(transitive)
+ Added@aws-sdk/util-buffer-from@1.0.0-rc.8(transitive)
+ Added@aws-sdk/util-locate-window@3.693.0(transitive)
+ Added@aws-sdk/util-utf8-browser@3.259.0(transitive)
+ Added@smithy/types@3.7.2(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@aws-crypto/ie11-detection@0.1.0(transitive)
- Removed@aws-crypto/sha256-browser@0.1.0(transitive)
- Removed@aws-crypto/sha256-js@0.1.0(transitive)
- Removed@aws-crypto/supports-web-crypto@0.1.0(transitive)