@kazura/web-crypto
TypeScript icon, indicating that this package has built-in type declarations

3.1.1 • Public • Published

npm size license

@kazura/web-crypto

web crypto

Install

pnpm i @kazura/web-crypto

Usage

import { Base64, md5, Rsa1024, Aes128Ecb } from '@kazura/web-crypto'

// md5
md5('plain text')

// base64
const base64Ciphertext = Base64.stringify('plain text')
Base64.parse(base64Ciphertext)

// aes-128-ecb
const aesCiphertext = Aes128Ecb.encrypt('plain text', 'secret key')
Aes128Ecb.decrypt(aesCiphertext, 'secret key')

// rsa-1024
const certificate = Rsa1024.createCertificate()
const rsaCiphertext = Rsa1024.encrypt('plain text', certificate.pubkey)
Rsa1024.decrypt(rsaCiphertext, certificate.privkey)

Author

👤 kazura233

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

Readme

Keywords

Package Sidebar

Install

npm i @kazura/web-crypto

Weekly Downloads

19

Version

3.1.1

License

MIT

Unpacked Size

20.3 kB

Total Files

33

Last publish

Collaborators

  • kazura