Skip to content

Instantly share code, notes, and snippets.

View jeevan449's full-sized avatar
💭
Pythonista

Jeevan Chaitanya jeevan449

💭
Pythonista
View GitHub Profile
@paoneJP
paoneJP / parse_jwe_sample_using_python-rsa_and_pyaes.py
Created May 1, 2016 08:18
Parsing a JWE Example which is described in draft-ietf-jose-json-web-encryption Appendix A.2 (RSA1_5 and A128CBC-HS256). This version uses python-rsa and pyaes.
from base64 import urlsafe_b64decode
import hmac
from hashlib import sha256
import rsa
from rsa.transform import bytes2int, int2bytes
import pyaes
# RSA Key described in A.2.3
@Artanis
Artanis / build.sh
Created September 17, 2011 08:43
Python C Extension Hello World
gcc -fpic --shared $(python-config --includes) greetmodule.c -o greetmodule.so