1.0.7 • Published 1 year ago

encrypter-util v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Encrypter

To use this library you needs to run something like this:

import { Encrypter } from 'encrypter-util';

const encrypter = new Encrypter();
const user = {
  password: '1234'
}; // Your User Entity

const yourPassword = '1234';

user.password = encrypter.hashPassword(yourPassword); // Your user Password is now hashed
const compareBuffers = encrypter.comparePassword(user.password, yourPassword); // Compare user password to password given with user. Compares the underlying bytes that represent the givenArrayBuffer, TypedArray, or DataView instances using a constant-time algorithm.

console.log(
  user.password, //password hashed
  compareBuffers // true or false | compares the underlying bytes that represent the givenArrayBuffer, TypedArray, or DataView instances using a constant-time algorithm
);
1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago