0.2.37 • Published 9 months ago

@leofcoin/crypto v0.2.37

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@leofcoin/crypto

a simple nodejs/web crypto api

install

usage

import {
  uint8ArrayToHex,
  arrayBufferToHex,
  hexToUint8Array,
  randombytes,
  createHash,
  encrypt,
  decrypt,
  generateAesKey,
  importAesKey,
  exportAesKey,
  encryptAes,
  decryptAes,
  generatePbkdf2,
  pbkdf2
} from '@leofcoin/crypto'

checkout breaking changes

api

uint8ArrayToHex(uint8Array)

arrayBufferToHex(arrayBuffer)

hexToUint8Array(hex)

randombytes(length)

async createHash(data, algorithm)

async encrypt(string)

async decrypt({cipher, key, iv})

async generateAesKey(length)

async importAesKey(exported, format, length)

async exportAesKey(key, format)

async encryptAes(uint8Array, key, iv)

async decryptAes(uint8Array, key, iv)

async generatePbkdf2(password)

async pbkdf2(password, salt, iterations, length, hash)

0.2.37

9 months ago

0.2.36

10 months ago

0.2.28

10 months ago

0.2.27

10 months ago

0.2.26

10 months ago

0.2.24

10 months ago

0.2.23

10 months ago

0.2.19

10 months ago

0.2.18

10 months ago

0.2.17

10 months ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago