@types/bcryptjs
Advanced tools
Comparing version 2.3.30 to 2.4.0
@@ -1,4 +0,4 @@ | ||
// Type definitions for bcryptjs v2.3.0 | ||
// Type definitions for bcryptjs v2.4.0 | ||
// Project: https://github.com/dcodeIO/bcrypt.js | ||
// Definitions by: Joshua Filby <https://github.com/Joshua-F/> | ||
// Definitions by: Joshua Filby <https://github.com/Joshua-F/>, Rafael Kraut <https://github.com/RafaelKr/> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -19,2 +19,3 @@ | ||
* @return Resulting salt | ||
* @throws If a random fallback is required but not set | ||
*/ | ||
@@ -25,2 +26,9 @@ export declare function genSaltSync(rounds?: number): string; | ||
* Asynchronously generates a salt. | ||
* @param rounds Number of rounds to use, defaults to 10 if omitted | ||
* @return Promise with resulting salt, if callback has been omitted | ||
*/ | ||
export declare function genSalt(rounds?: number): Promise<string>; | ||
/** | ||
* Asynchronously generates a salt. | ||
* @param callback Callback receiving the error, if any, and the resulting salt | ||
@@ -49,6 +57,14 @@ */ | ||
* @param salt Salt length to generate or salt to use | ||
* @return Promise with resulting hash, if callback has been omitted | ||
*/ | ||
export declare function hash(s: string, salt: number | string): Promise<string>; | ||
/** | ||
* Asynchronously generates a hash for the given string. | ||
* @param s String to hash | ||
* @param salt Salt length to generate or salt to use | ||
* @param callback Callback receiving the error, if any, and the resulting hash | ||
* @param progressCallback Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per MAX_EXECUTION_TIME = 100 ms. | ||
*/ | ||
export declare function hash(s: string, salt: number | string, callback: (err: Error, hash: string) => void, progressCallback?: (percent: number) => void): void; | ||
export declare function hash(s: string, salt: number | string, callback?: (err: Error, hash: string) => void, progressCallback?: (percent: number) => void): void; | ||
@@ -67,6 +83,14 @@ /** | ||
* @param hash Data to be compared to | ||
* @return Promise, if callback has been omitted | ||
*/ | ||
export declare function compare(s: string, hash: string): Promise<boolean>; | ||
/** | ||
* Asynchronously compares the given data against the given hash. | ||
* @param s Data to compare | ||
* @param hash Data to be compared to | ||
* @param callback Callback receiving the error, if any, otherwise the result | ||
* @param progressCallback Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per MAX_EXECUTION_TIME = 100 ms. | ||
*/ | ||
export declare function compare(s: string, hash: string, callback: (err: Error, success: boolean) => void, progressCallback?: (percent: number) => void): void; | ||
export declare function compare(s: string, hash: string, callback?: (err: Error, success: boolean) => void, progressCallback?: (percent: number) => void): void; | ||
@@ -73,0 +97,0 @@ /** |
{ | ||
"name": "@types/bcryptjs", | ||
"version": "2.3.30", | ||
"description": "TypeScript definitions for bcryptjs v2.3.0", | ||
"version": "2.4.0", | ||
"description": "TypeScript definitions for bcryptjs", | ||
"license": "MIT", | ||
"author": "Joshua Filby <https://github.com/Joshua-F/>", | ||
"author": "Joshua Filby <https://github.com/Joshua-F/>, Rafael Kraut <https://github.com/RafaelKr/>", | ||
"main": "", | ||
@@ -14,4 +14,5 @@ "repository": { | ||
"dependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "3c298687a2a280129076c2f0cc680ed175688c9a565941c354af6cb61d17214d" | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "e4cc9353bd823162df7e4701223782ecb067ba51c336e0c91ed2868b6956e77f", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,10 +5,9 @@ # Installation | ||
# Summary | ||
This package contains type definitions for bcryptjs v2.3.0 (https://github.com/dcodeIO/bcrypt.js). | ||
This package contains type definitions for bcryptjs (https://github.com/dcodeIO/bcrypt.js). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/bcryptjs | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/bcryptjs | ||
Additional Details | ||
* Last updated: Mon, 19 Sep 2016 16:15:23 GMT | ||
* File structure: ProperModule | ||
* Last updated: Mon, 09 Jan 2017 15:21:42 GMT | ||
* Library Dependencies: none | ||
@@ -19,2 +18,2 @@ * Module Dependencies: none | ||
# Credits | ||
These definitions were written by Joshua Filby <https://github.com/Joshua-F/>. | ||
These definitions were written by Joshua Filby <https://github.com/Joshua-F/>, Rafael Kraut <https://github.com/RafaelKr/>. |
{ | ||
"authors": "Joshua Filby <https://github.com/Joshua-F/>", | ||
"definitionFilename": "index.d.ts", | ||
"authors": "Joshua Filby <https://github.com/Joshua-F/>, Rafael Kraut <https://github.com/RafaelKr/>", | ||
"libraryDependencies": [], | ||
"moduleDependencies": [], | ||
"libraryMajorVersion": "2", | ||
"libraryMinorVersion": "3", | ||
"libraryName": "bcryptjs v2.3.0", | ||
"libraryMajorVersion": 2, | ||
"libraryMinorVersion": 4, | ||
"typeScriptVersion": "2.0", | ||
"libraryName": "bcryptjs", | ||
"typingsPackageName": "bcryptjs", | ||
"projectName": "https://github.com/dcodeIO/bcrypt.js", | ||
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
"sourceBranch": "types-2.0", | ||
"kind": "ProperModule", | ||
"sourceBranch": "master", | ||
"globals": [], | ||
@@ -22,3 +21,3 @@ "declaredModules": [ | ||
"hasPackageJson": false, | ||
"contentHash": "3c298687a2a280129076c2f0cc680ed175688c9a565941c354af6cb61d17214d" | ||
"contentHash": "e4cc9353bd823162df7e4701223782ecb067ba51c336e0c91ed2868b6956e77f" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6515
111
0
18