Skip to content

Instantly share code, notes, and snippets.

View ameyanekar's full-sized avatar

Amey Anekar ameyanekar

View GitHub Profile
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()
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()
@ameyanekar
ameyanekar / Code.gs
Created June 27, 2023 14:34
Add AES Encryption/Decryption Capability to your Google Sheet
// 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);