0.2.0 • Published 1 year ago

@qxy/cipher v0.2.0

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

qxy-cipher

CI NPM VERSION Coverage Status LICENSE

:lock: QXY-FE cipher utils for OA projects.

Install

npm -i @qxy/cipher crypto-js -S
yarn add @qxy/cipher crypto-js
pnpm add @qxy/cipher crypto-js

Usage

import { createCipher } from '@qxy/cipher'
import { getHash } from '@/services/utils'

const password = 'foobar'
const { hash: key } = await getHash()
const { encrypt, decrypt } = createCipher({ key })

const encryptedPassword = encrypt(password)
console.log(encryptedPassword) // => encryptedMessage

const decryptedPassword = decrypt(encryptedPassword)
console.log(decryptedPassword) // => `foobar`

License

MIT License © 2022 ntnyq

0.2.0

1 year ago

0.1.0

2 years ago

0.1.1

2 years ago

0.0.8

2 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago