0.3.2 • Published 4 months ago

@lindorm-io/crypto v0.3.2

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
-
Last release
4 months ago

@lindorm-io/crypto

Simplified crypto handlers for lindorm.io packages

Installation

npm install --save @lindorm-io/crypto

Usage

CryptoAES

Wraps the crypto-js AES functions in a simple helper class

const aes = new CryptoAES({
  secret: "secret",
});
const signature = aes.encrypt("input");

const valid = aes.verify("input", signature);
const decrypted = aes.decrypt(signature);
aes.assert("input", signature);

CryptoSHA

Wraps the crypto-js SHA functisns in a simple helper class

const sha = new CryptoSHA({
  secret: "secret",
});
const signature = sha.encrypt("input");

const valid = sha.verify("input", signature);
sha.assert("input", signature);

CryptoArgon

Wraps the argon2 functions in a simple helper class

const argon = new CryptoArgon();
const signature = await argon.encrypt("input");

const valid = await argon.verify("input", signature);
await argon.assert("input", signature);

CryptoPassword

Wraps passwords in an onion using CryptoAES, CryptoSHA, and CryptoArgon.

const password = new CryptoPassword({
  aesSecret: "aes-secret",
  shaSecret: "sha-secret",
});
const signature = await password.encrypt("input");

const valid = await password.verify("input", signature);
await password.assert("input", signature);

CryptoSecret

Wraps secrets in an onion using CryptoAES and CryptoSHA.

const secret = new CryptoSecret({
  aesSecret: "aes-secret",
  shaSecret: "sha-secret",
});
const signature = await secret.encrypt("input");

const valid = await secret.verify("input", signature);
await secret.assert("input", signature);
0.3.2

4 months ago

0.3.1

5 months ago

0.3.0

5 months ago

0.1.34

6 months ago

0.2.0

5 months ago

0.1.30

1 year ago

0.1.31

1 year ago

0.1.32

1 year ago

0.1.33

1 year ago

0.1.29

1 year ago

0.1.27

1 year ago

0.1.28

1 year ago

0.1.20

1 year ago

0.1.21

1 year ago

0.1.22

1 year ago

0.1.23

1 year ago

0.1.24

1 year ago

0.1.25

1 year ago

0.1.26

1 year ago

0.1.19

1 year ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago