diff options
author | equinox <equinox@diac24.net> | 2011-04-01 06:42:37 +0200 |
---|---|---|
committer | equinox <equinox@diac24.net> | 2011-04-01 06:42:37 +0200 |
commit | a48c542228cfec15ad9023bc7fe9a9d9cd1aeb2c (patch) | |
tree | fcc8d66c38d9f4f1002f38e2a5ecbdf7bf43f731 /dosign.py | |
parent | 5a8eaedec7b4354d82f00a9b8e8215828bdac611 (diff) |
remove old testing programs
Diffstat (limited to 'dosign.py')
-rw-r--r-- | dosign.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/dosign.py b/dosign.py deleted file mode 100644 index e0d3465..0000000 --- a/dosign.py +++ /dev/null @@ -1,19 +0,0 @@ -import M2Crypto.RSA -import M2Crypto.EVP -import time -import base64, urllib - -ts = int(time.time()) -user = 'equinox' -data = '%d:%s' % (ts, user) - -algo = 'sha256' - -digest = M2Crypto.EVP.MessageDigest(algo) -digest.update(data) -digval = digest.final() - -key = M2Crypto.RSA.load_key('rsa.pem') -signature = key.sign(digval, algo = algo) - -print urllib.urlencode([('user', user), ('ts', ts), ('signature', base64.urlsafe_b64encode(signature))]) |