Exemple #1
0
 def _make_id(self):
     myid = 'M' + version.split()[0].replace('.', '-')
     myid = myid + ('-' * (8-len(myid)))+sha(repr(time())+ ' ' +
                                  str(getpid())).digest()[-6:].encode('hex')
     return myid
Exemple #2
0
def make_id():
    myid = 'M' + version.split()[0].replace('.', '-')
    padded = myid[:8] + '-' * (8 - len(myid))
    myid = padded + os.urandom(6).encode('hex')
    return myid
Exemple #3
0
def make_id():
    myid = 'M' + version.split()[0].replace('.', '-')
    myid = myid + ('-' * (8-len(myid)))+sha(repr(time())+ ' ' +
                                            str(getpid())).digest()[-6:].encode('hex')
    return myid