Skip to content

Instantly share code, notes, and snippets.

@legend80s
legend80s / Crypto.js
Last active April 8, 2022 07:28
AES/ECB/PKCS5Padding Cipher and Decipher of Node.js and can communicate with other languages
// modified based on [node.js AES/ECB/PKCS5Padding 与其他语言的加密解密通用](http://yijiebuyi.com/blog/13e2ae33082ac12ba4946b033be04bb5.html)
const crypto = require('crypto');
module.exports = class Crypto {
/**
* 加解密必须使用同一套 key 和 iv
* @param {String} algorithm 算法名称,比如 `aes-128-ecb`
* @param {String} key 秘钥
* @param {String} iv initialization vector,默认空字符串
*/
@coolaj86
coolaj86 / README.md
Last active October 12, 2024 15:19
Let Google cache and resize your images