From 4e75bedf293bbb6e9d412f3cd82a61b071d9ff41 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 9 Jun 2019 14:58:59 +0300 Subject: [PATCH] Cryptographic hash should have hash.Hash interface --- src/cypherpunks.ru/gogost/gost34112012256/hash.go | 4 +++- src/cypherpunks.ru/gogost/gost34112012512/hash.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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) } -- 2.44.0