From: Sergey Matveev Date: Sun, 9 Jun 2019 11:58:59 +0000 (+0300) Subject: Cryptographic hash should have hash.Hash interface X-Git-Tag: 3.0~17 X-Git-Url: http://www.git.cypherpunks.ru/?p=gogost.git;a=commitdiff_plain;h=4e75bedf293bbb6e9d412f3cd82a61b071d9ff41 Cryptographic hash should have hash.Hash interface --- diff --git a/src/cypherpunks.ru/gogost/gost34112012256/hash.go b/src/cypherpunks.ru/gogost/gost34112012256/hash.go index bc0c662..c5d655f 100644 --- a/src/cypherpunks.ru/gogost/gost34112012256/hash.go +++ b/src/cypherpunks.ru/gogost/gost34112012256/hash.go @@ -19,6 +19,8 @@ package gost34112012256 import ( + "hash" + "cypherpunks.ru/gogost/internal/gost34112012" ) @@ -27,6 +29,6 @@ const ( Size = 32 ) -func New() *gost34112012.Hash { +func New() hash.Hash { return gost34112012.New(32) } diff --git a/src/cypherpunks.ru/gogost/gost34112012512/hash.go b/src/cypherpunks.ru/gogost/gost34112012512/hash.go index 419dedd..c6a708f 100644 --- a/src/cypherpunks.ru/gogost/gost34112012512/hash.go +++ b/src/cypherpunks.ru/gogost/gost34112012512/hash.go @@ -19,6 +19,8 @@ package gost34112012512 import ( + "hash" + "cypherpunks.ru/gogost/internal/gost34112012" ) @@ -27,6 +29,6 @@ const ( Size = 64 ) -func New() *gost34112012.Hash { +func New() hash.Hash { return gost34112012.New(64) }