# crypto-wasm ### JavaScript / TypeScript 调用 ```ts import { encrypt, decrypt } from '@dm/crypto-wasm'; function main() { const cipher = encrypt('hello world'); const plain = decrypt(cipher); console.log(cipher); // Base64 console.log(plain); // hello world } main(); ``` ### 3) API - `encrypt(data: string): string`:返回 Base64 密文 - `decrypt(data: string): string`:返回明文字符串