This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (c) Matthew Wardrop 2019; Licensed under the MIT license | |
# | |
# This script provides the ability to run a notebook in the same Python | |
# process as this script, allowing it to access to variables created | |
# by the notebook for other purposes. In most cases, this is of limited | |
# utility and not a best-practice, but there are some limited cases in | |
# which this capability is valuable, and this script was created for | |
# such cases. For all other cases, you are better off using the | |
# `nbconvert` execution API found @: | |
# https://nbconvert.readthedocs.io/en/latest/execute_api.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const crypto = require('crypto'); | |
const AES_METHOD = 'aes-256-cbc'; | |
const IV_LENGTH = 16; // For AES, this is always 16, checked with php | |
const password = 'lbwyBzfgzUIvXZFShJuikaWvLJhIVq36'; // Must be 256 bytes (32 characters) | |
function encrypt(text, password) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |