~gandelman-a/ubuntu/precise/keystone/UCA_2012.2.1

« back to all changes in this revision

Viewing changes to keystone/common/utils.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Soren Hansen, Logan Rosen, Chuck Short
  • Date: 2012-09-07 13:04:01 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20120907130401-o49wh9xxkr2cmuqx
Tags: 2012.2~rc1~20120906.2517-0ubuntu2
[ Adam Gandelman ]
* Refreshed patches.

[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* Fix Launchpad URLs in debian/watch.

[ Logan Rosen ]
* Fix control file to suggest python-memcache instead of python-memcached
  (LP: #998991).

[ Chuck Short ]
* New upstream version.
* Dont FTBFS if the testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import json
25
25
import os
26
26
import subprocess
27
 
import sys
28
27
import time
29
28
import urllib
30
29
 
263
262
        b = ord(known[i]) if i < k_len else 0
264
263
        result |= a ^ b
265
264
    return (p_len == k_len) & (result == 0)
 
265
 
 
266
 
 
267
def hash_signed_token(signed_text):
 
268
    hash_ = hashlib.md5()
 
269
    hash_.update(signed_text)
 
270
    return hash_.hexdigest()