Skip to content

Instantly share code, notes, and snippets.

Avatar

Jesse Crocker JesseCrocker

View GitHub Profile
@JesseCrocker
JesseCrocker / betterthanboto.py
Last active February 21, 2017 00:43 — forked from mekza/betterthanboto.py
Signed URLs and Signed Cookies for CloudFront in Python with boto
View betterthanboto.py
from boto.cloudfront.distribution import Distribution
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
import base64
class BetterThanBoto(Distribution):
def sign_rsa(self, message):