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
import sys | |
from Crypto.Cipher import AES | |
from Crypto.Util.Padding import unpad | |
import base64 | |
if not len(sys.argv) > 1: | |
print("Pass ciphertext to decrypt on the command line:") | |
print("Usage: python vfs-decrypt.py EncryptedId") | |
sys.exit() |
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
import sys | |
from Crypto.Cipher import AES | |
from Crypto.Util.Padding import pad | |
import base64 | |
if not len(sys.argv) > 1: | |
print("Pass a string to encrypt on the command line:") | |
print("Usage: python vfs-encrypt.py IdToEncrypt") | |
sys.exit() |
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
// The below code will create two functions for you: | |
// encrypt(plaintext) | |
// decrypt(ciphertext) | |
// Update the `asciiKey` variable to adjust the key, or even better, pass the key in the function | |
(function(root) { | |
"use strict"; | |
function checkInt(value) { | |
return (parseInt(value) === value); |