Socket
Socket
Sign inDemoInstall

@types/bcrypt

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/bcrypt - npm Package Compare versions

Comparing version 0.0.30 to 1.0.0

31

bcrypt/index.d.ts

@@ -1,4 +0,4 @@

// Type definitions for bcrypt
// Type definitions for bcrypt 1.0
// Project: https://www.npmjs.org/package/bcrypt
// Definitions by: Peter Harris <https://github.com/codeanimal>
// Definitions by: Peter Harris <https://github.com/codeanimal>, Ayman Nedjmeddine <https://github.com/IOAyman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -15,8 +15,10 @@

* @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous.
* @return A promise to be either resolved with the generated salt or rejected with an Error
*/
export declare function genSalt(rounds: number, callback: (err: Error, salt: string) => void): void;
export declare function genSalt(rounds: number, callback?: (err: Error, salt: string) => void): Promise<string>;
/**
* @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous.
* @return A promise to be either resolved with the generated salt or rejected with an Error
*/
export declare function genSalt(callback: (err: Error, salt: string) => void): void;
export declare function genSalt(callback?: (err: Error, salt: string) => void): Promise<string>;

@@ -27,8 +29,3 @@ /**

*/
export declare function hashSync(data: any, salt: string): string;
/**
* @param data The data to be encrypted.
* @param rounds A salt will be generated using the rounds specified.
*/
export declare function hashSync(data: any, rounds: number): string;
export declare function hashSync(data: any, saltOrRounds: string | number): string;

@@ -39,10 +36,5 @@ /**

* @param callback A callback to be fired once the data has been encrypted. Uses eio making it asynchronous.
* @return A promise to be either resolved with the encrypted data salt or rejected with an Error
*/
export declare function hash(data: any, salt: string, callback: (err: Error, encrypted: string) => void): void;
/**
* @param data The data to be encrypted.
* @param rounds A salt will be generated using the rounds specified.
* @param callback A callback to be fired once the data has been encrypted. Uses eio making it asynchronous.
*/
export declare function hash(data: any, rounds: number, callback: (err: Error, encrypted: string) => void): void;
export declare function hash(data: any, saltOrRounds: string | number, callback?: (err: Error, encrypted: string) => void): Promise<string>;

@@ -59,10 +51,11 @@ /**

* @param callback A callback to be fire once the data has been compared. Uses eio making it asynchronous.
* @return A promise to be either resolved with the comparision result salt or rejected with an Error
*/
export declare function compare(data: any, encrypted: string, callback: (err: Error, same: boolean) => void): void;
export declare function compare(data: any, encrypted: string, callback?: (err: Error, same: boolean) => void): Promise<boolean>;
/**
* Return the number of rounds used to encrypt a given hash
*
*
* @param encrypted Hash from which the number of rounds used should be extracted.
*/
export declare function getRounds(encrypted: string): number;
{
"name": "@types/bcrypt",
"version": "0.0.30",
"version": "1.0.0",
"description": "TypeScript definitions for bcrypt",
"license": "MIT",
"author": "Peter Harris <https://github.com/codeanimal>",
"author": "Peter Harris <https://github.com/codeanimal>, Ayman Nedjmeddine <https://github.com/IOAyman>",
"main": "",

@@ -14,4 +14,4 @@ "repository": {

"dependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "cf4a7e42f05085498406d98ae71fa00e2b0c7f100b46d9a5c789c1866fa49198"
"peerDependencies": {},
"typesPublisherContentHash": "6ce38a04e6574b9f5c158684838379d9a3e7772597624f72be1458d550d3e3c3"
}

@@ -8,7 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/bcrypt
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/bcrypt
Additional Details
* Last updated: Mon, 19 Sep 2016 16:15:23 GMT
* File structure: ProperModule
* Last updated: Sat, 17 Dec 2016 13:47:22 GMT
* Library Dependencies: none

@@ -19,2 +18,2 @@ * Module Dependencies: none

# Credits
These definitions were written by Peter Harris <https://github.com/codeanimal>.
These definitions were written by Peter Harris <https://github.com/codeanimal>, Ayman Nedjmeddine <https://github.com/IOAyman>.
{
"authors": "Peter Harris <https://github.com/codeanimal>",
"definitionFilename": "index.d.ts",
"authors": "Peter Harris <https://github.com/codeanimal>, Ayman Nedjmeddine <https://github.com/IOAyman>",
"libraryDependencies": [],
"moduleDependencies": [],
"libraryMajorVersion": "0",
"libraryMinorVersion": "0",
"libraryMajorVersion": 1,
"libraryMinorVersion": 0,
"libraryName": "bcrypt",

@@ -12,4 +11,3 @@ "typingsPackageName": "bcrypt",

"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"kind": "ProperModule",
"sourceBranch": "master",
"globals": [],

@@ -23,3 +21,3 @@ "declaredModules": [

"hasPackageJson": false,
"contentHash": "cf4a7e42f05085498406d98ae71fa00e2b0c7f100b46d9a5c789c1866fa49198"
"contentHash": "6ce38a04e6574b9f5c158684838379d9a3e7772597624f72be1458d550d3e3c3"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc