SHOW:
|
|
- or go back to the newest paste.
1 | ''' | |
2 | Exingulis Cryptography Department, a subset of the Exingulis Computing Department | |
3 | ||
4 | Name: Protocol 5 Prototype Function | |
5 | PN: NXLE055CD | |
6 | CodeID: CD06114 | |
7 | BLoc: "\Atrisk\ComD\CryptD\ExpEncProgram\Protocol 5\func.py" | |
8 | ''' | |
9 | ||
10 | import hashlib | |
11 | ||
12 | def pr5(plaintext): | |
13 | defaultKey = "DBx2Ip6nYyr6khhlIv95tzZhUkqEDftY" | |
14 | keylist = "" | |
15 | ||
16 | for i in plaintext.lower(): | |
17 | key = hashlib.sha1() | |
18 | key.update(defaultKey + i + keylist) | |
19 | keylist = keylist + key.hexdigest()[:5] + "." | |
20 | ||
21 | return keylist |