]> Cypherpunks.ru repositories - gogost.git/blob - gost34112012512/hash.go
06e1a86109550a28ed29decfad9a7bbfb9dc2b43
[gogost.git] / gost34112012512 / hash.go
1 // GoGOST -- Pure Go GOST cryptographic functions library
2 // Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, version 3 of the License.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 // GOST R 34.11-2012 512-bit hash function.
17 // RFC 6986.
18 package gost34112012512
19
20 import (
21         "hash"
22
23         "go.cypherpunks.ru/gogost/v4/internal/gost34112012"
24 )
25
26 const (
27         BlockSize = gost34112012.BlockSize
28         Size      = 64
29 )
30
31 /*
32 func init() {
33         crypto.RegisterHash(crypto.GOSTR34112012512, New)
34 }
35 */
36
37 func New() hash.Hash {
38         return gost34112012.New(64)
39 }