From b23acf97f8bf926a477dfc38e18819f9e10da8fc Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 21 Apr 2018 00:02:23 +0200 Subject: [PATCH] [lib.scha] updated size type (uint16) --- src/git.xdrm.io/schastsp/lib/scha/scha.go | 4 ++-- src/git.xdrm.io/schastsp/lib/scha/scha_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git.xdrm.io/schastsp/lib/scha/scha.go b/src/git.xdrm.io/schastsp/lib/scha/scha.go index fbfc99b..2113520 100644 --- a/src/git.xdrm.io/schastsp/lib/scha/scha.go +++ b/src/git.xdrm.io/schastsp/lib/scha/scha.go @@ -9,8 +9,8 @@ import ( /* (0) Static ---------------------------------------------------------*/ /* (1) Constants */ -const HBITSIZE uint = 512; -const HSIZE uint = HBITSIZE / 8; +const HBITSIZE uint32 = 512; +const HSIZE uint16 = uint16(HBITSIZE / 8); diff --git a/src/git.xdrm.io/schastsp/lib/scha/scha_test.go b/src/git.xdrm.io/schastsp/lib/scha/scha_test.go index 7809b48..daa6bb7 100644 --- a/src/git.xdrm.io/schastsp/lib/scha/scha_test.go +++ b/src/git.xdrm.io/schastsp/lib/scha/scha_test.go @@ -20,7 +20,7 @@ func TestSimpleHash(t *testing.T){ } /* (2) Fail on wrong size */ - if digestLength != HSIZE { + if uint16(digestLength) != HSIZE { t.Errorf("Expected hash digest of %d bytes ; %d bytes received", HSIZE, digestLength); }