1.0.7 • Published 2 years ago

encrypter-util v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago