Created
March 2, 2019 20:20
-
-
Save varshavaradarajan/ef13759505c3bb8d22c8d43fbfa0f0af to your computer and use it in GitHub Desktop.
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
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.Hash import SHA | |
from base64 import b64decode | |
import requests | |
key = 'need-to-populate' | |
rsa_key = RSA.importKey(key) | |
verifier = PKCS1_v1_5.new(rsa_key) | |
raw_cipher_data = b64decode(f.open('foo.txt.enc')) | |
foo = rsa_key.decrypt(raw_cipher_data) | |
// POST to API service | |
r = requests.post('', data = {'file':'foo.txt'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment