Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| /** | |
| * Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
| * (c) Chris Veness MIT Licence | |
| * | |
| * @param {String} plaintext - Plaintext to be encrypted. | |
| * @param {String} password - Password to use to encrypt plaintext. | |
| * @returns {String} Encrypted ciphertext. | |
| * | |
| * @example | |
| * const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
| var udp = require('dgram'); | |
| // --------------------creating a udp server -------------------- | |
| // creating a udp server | |
| var server = udp.createSocket('udp4'); | |
| // emits when any error occurs | |
| server.on('error',function(error){ | |
| console.log('Error: ' + error); |
| import platform | |
| if platform.system() == "Windows": | |
| import msvcrt | |
| def getch(): | |
| return msvcrt.getch() | |
| else: | |
| import tty, termios, sys | |
| def getch(): | |
| fd = sys.stdin.fileno() |
| """ | |
| Tools for creating a CA cert and signed server certs. | |
| Divined from http://svn.osafoundation.org/m2crypto/trunk/tests/test_x509.py | |
| The mk_temporary_xxx calls return a NamedTemporaryFile with certs. | |
| Usage ; | |
| # Create a temporary CA cert and it's private key | |
| cacert, cakey = mk_temporary_cacert() |