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); }