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

1.0.9 • Public • Published

#@ctsy/crypto 加解密工具

import { RSA, MD5 } from './index'
import { AES } from '../dist';
//RSA 加密
let data = "a", key = "a";
RSA.publicEncrypt(data, key)
RSA.privateEncrypt(data, key);
RSA.publicDecrypt(data, key);
RSA.privateDecrypt(data, key)


//AES 加减密
let aes = new AES('MuY78fCSsp', 'AES-128-ECB'.toLowerCase());
let s = aes.encode('a');
console.log(s)
console.log(aes.decode(s))

//MD5

MD5.encode(data);

MD5.password_hash(data, key);
MD5.password_verify(data, key);

Readme

Keywords

none

Package Sidebar

Install

npm i @ctsy/crypto

Weekly Downloads

2

Version

1.0.9

License

ISC

Unpacked Size

7.85 kB

Total Files

8

Last publish

Collaborators

  • ida_xyt
  • yanpengquan