bcrypt-ts
Advanced tools
Comparing version 2.2.2 to 3.0.0
{ | ||
"name": "bcrypt-ts", | ||
"version": "2.2.2", | ||
"version": "3.0.0", | ||
"description": "bcrypt written in typescript", | ||
@@ -45,3 +45,3 @@ "keywords": [ | ||
], | ||
"packageManager": "pnpm@7.14.1", | ||
"packageManager": "pnpm@7.14.2", | ||
"devDependencies": { | ||
@@ -54,3 +54,3 @@ "@rollup/plugin-alias": "4.0.2", | ||
"@typescript-eslint/parser": "5.42.0", | ||
"@vitest/coverage-c8": "0.24.4", | ||
"@vitest/coverage-c8": "0.24.5", | ||
"c8": "7.12.0", | ||
@@ -68,3 +68,3 @@ "eslint": "8.26.0", | ||
"vite": "3.2.2", | ||
"vitest": "0.24.4" | ||
"vitest": "0.24.5" | ||
}, | ||
@@ -71,0 +71,0 @@ "scripts": { |
@@ -34,2 +34,10 @@ # bcrypt-ts | ||
### How to choose between them | ||
- If you are using this package in pure Node.js environment, then you will probably use the node bundle. | ||
- If you are using bundler like webpack and vite, then you will probably use the client bundle. | ||
- If you meet any issues that a incorrect bundle is used, you can use `bcrypt-ts/node` and `bcrypt-ts/client` to force the correct bundle. | ||
## Usage - Sync | ||
@@ -111,20 +119,2 @@ | ||
/** | ||
* Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet. | ||
* | ||
* @param byteArray Byte array | ||
* @param length Maximum input length | ||
*/ | ||
export const encodeBase64: ( | ||
byteArray: number[] | Buffer, | ||
length: number | ||
) => string; | ||
/** | ||
* Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet. | ||
* | ||
* @param contentString String to decode | ||
* @param length Maximum output length | ||
*/ | ||
export const decodeBase64: (contentString: string, length: number) => number[]; | ||
/** | ||
* Synchronously tests a string against a hash. | ||
@@ -131,0 +121,0 @@ * |
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
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
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
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
339924
298
199