bcryptserver
Advanced tools
| /// <reference types="node" /> | ||
| export declare class bcryptClient { | ||
| private silentFallback; | ||
| private baseUrl; | ||
| private options; | ||
| constructor(baseUrl: string, cacert?: Buffer, silentFallback?: boolean); | ||
| hash(data: string, rounds: number): Promise<any>; | ||
| compare(data: string, hash: string): Promise<boolean>; | ||
| } |
@@ -22,6 +22,6 @@ "use strict"; | ||
| } | ||
| async Hash(data, rounds) { | ||
| async hash(data, rounds) { | ||
| let error; | ||
| let returnValue = undefined; | ||
| const [response, errorNeedle] = await Utilities_1.Utilities.result(needle('post', this.baseUrl + '/Hash/' + rounds, { | ||
| const [response, errorNeedle] = await Utilities_1.Utilities.result(needle('post', this.baseUrl + '/hash/' + rounds, { | ||
| data: data | ||
@@ -66,6 +66,6 @@ })); | ||
| } | ||
| async Compare(data, hash) { | ||
| async compare(data, hash) { | ||
| let error; | ||
| let returnValue = false; | ||
| const [response, errorNeedle] = await Utilities_1.Utilities.result(needle('post', this.baseUrl + '/Compare', { | ||
| const [response, errorNeedle] = await Utilities_1.Utilities.result(needle('post', this.baseUrl + '/compare', { | ||
| data: data, | ||
@@ -72,0 +72,0 @@ hash: hash |
+2
-1
@@ -5,2 +5,3 @@ { | ||
| "main": "dist/bcryptClient.js", | ||
| "types": "bcryptClient.d.ts", | ||
| "repository": { | ||
@@ -10,3 +11,3 @@ "type": "git", | ||
| }, | ||
| "version": "1.2.0", | ||
| "version": "1.2.1", | ||
| "keywords": [ | ||
@@ -13,0 +14,0 @@ "bcrypt", |
@@ -16,3 +16,3 @@ import * as bcrypt from 'bcrypt'; | ||
| constructor( baseUrl: string, cacert: Buffer = undefined, silentFallback = true ) { | ||
| public constructor( baseUrl: string, cacert: Buffer = undefined, silentFallback = true ) { | ||
| this.baseUrl = baseUrl; | ||
@@ -25,3 +25,3 @@ if( cacert ) { | ||
| public async Hash( data: string, rounds: number ) { | ||
| public async hash( data: string, rounds: number ) { | ||
| let error: Error; | ||
@@ -31,3 +31,3 @@ let returnValue = undefined; | ||
| 'post', | ||
| this.baseUrl + '/Hash/' + rounds, | ||
| this.baseUrl + '/hash/' + rounds, | ||
| { | ||
@@ -70,3 +70,3 @@ data: data | ||
| public async Compare( data: string, hash: string ) { | ||
| public async compare( data: string, hash: string ) { | ||
| let error: Error; | ||
@@ -76,3 +76,3 @@ let returnValue: boolean = false; | ||
| 'post', | ||
| this.baseUrl + '/Compare', | ||
| this.baseUrl + '/compare', | ||
| { | ||
@@ -79,0 +79,0 @@ data: data, |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
28853
1.29%17
6.25%723
1.26%