Skip to content

Instantly share code, notes, and snippets.

@zD98
zD98 / CryptoJS-DES.html
Created July 13, 2017 11:33 — forked from ufologist/CryptoJS-DES.html
Use CryptoJS encrypt message by DES and direct decrypt ciphertext, compatible with Java Cipher.getInstance("DES")
<!-- test pass with CryptoJS v3.1.2 -->
<script src="rollups/tripledes.js"></script>
<script src="components/mode-ecb.js"></script>
<script>
/**
* Encrypt message by DES in ECB mode and Pkcs7 padding scheme
*
* NOTE: DES is weak, please use 3DES(Triple DES) or AES
*
* @param {String} message
@zD98
zD98 / nodejs.errno.h
Created July 6, 2017 07:24 — forked from pbojinov/nodejs.errno.h
node.js errno descriptions. Useful for debugging.
/* Pulled from https://github.com/joyent/node/blob/master/deps/uv/include/uv.h */
/* Expand this list if necessary. */
#define UV_ERRNO_MAP(XX) \
XX(E2BIG, "argument list too long") \
XX(EACCES, "permission denied") \
XX(EADDRINUSE, "address already in use") \
XX(EADDRNOTAVAIL, "address not available") \
XX(EAFNOSUPPORT, "address family not supported") \
XX(EAGAIN, "resource temporarily unavailable") \
XX(EAI_ADDRFAMILY, "address family not supported") \