From RFC 4880 [1]:
ID Algorithm Text Name
-- --------- ---------
1 - MD5 [HAC] "MD5"
2 - SHA-1 [FIPS180] "SHA1"
3 - RIPE-MD/160 [HAC] "RIPEMD160"
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved
8 - SHA256 [FIPS180] "SHA256"
9 - SHA384 [FIPS180] "SHA384"
10 - SHA512 [FIPS180] "SHA512"
11 - SHA224 [FIPS180] "SHA224"
100 to 110 - Private/Experimental algorithm
[1]: http://tools.ietf.org/search/rfc4880#section-9.4
110: 'private',
}
+ _hash_algorithms = {
+ 1: 'md5',
+ 2: 'sha-1',
+ 3: 'ripe-md/160',
+ 4: 'reserved',
+ 5: 'reserved',
+ 6: 'reserved',
+ 7: 'reserved',
+ 8: 'sha256',
+ 9: 'sha384',
+ 10: 'sha512',
+ 11: 'sha224',
+ 100: 'private',
+ 101: 'private',
+ 102: 'private',
+ 103: 'private',
+ 104: 'private',
+ 105: 'private',
+ 106: 'private',
+ 107: 'private',
+ 108: 'private',
+ 109: 'private',
+ 110: 'private',
+ }
+
_clean_type_regex = _re.compile('\W+')
def _clean_type(self):