Created
February 16, 2015 19:27
-
-
Save jag3773/b46a54206d169cd5f086 to your computer and use it in GitHub Desktop.
Signing Session
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 ecdsa | |
from ecdsa import SigningKey, VerifyingKey | |
sk = SigningKey.from_pem(open('uW-test-sk.pem', 'r').read()) | |
payload = open('/var/www/vhosts/api.unfoldingword.org/httpdocs/obs/txt/1/en/obs-en.json', 'r').read() | |
sig_der = sk.sign_deterministic(payload, sigencode=ecdsa.util.sigencode_der) | |
f = open('/var/www/vhosts/api.unfoldingword.org/httpdocs/obs/txt/1/en/obs-en.der.sig', 'w') | |
f.write(sig_der) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment