]> Cypherpunks.ru repositories - pygost.git/blob - pygost/gost34112012512.py
Unify docstring's leading space presence
[pygost.git] / pygost / gost34112012512.py
1 """GOST R 34.11-2012 (Streebog) 512-bit hash function
2
3 This is implementation of :rfc:`6986`. Most function and variable names are
4 taken according to specification's terminology.
5 """
6
7 from pygost.gost34112012 import GOST34112012
8 from pygost.pbkdf2 import pbkdf2 as pbkdf2_base
9
10
11 class GOST34112012512(GOST34112012):
12     def __init__(self, data=b""):
13         super(GOST34112012512, self).__init__(data, digest_size=64)
14
15
16 def new(data=b""):
17     return GOST34112012512(data)
18
19
20 def pbkdf2(password, salt, iterations, dklen):
21     return pbkdf2_base(GOST34112012512, password, salt, iterations, dklen)