From 938df1b63c588808285acc6a3f7a0263a5fa411b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 21 Apr 2018 16:10:06 +0200 Subject: [PATCH] [client.keyset] renamed 'Write(io.Writer)' to 'Store(io.Writer)' and 'Read(io.Reader)' to 'Fetch(io.Reader)' --- src/git.xdrm.io/schastsp/client/keyset/keyset.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git.xdrm.io/schastsp/client/keyset/keyset.go b/src/git.xdrm.io/schastsp/client/keyset/keyset.go index 0a128e8..5d7f3ba 100644 --- a/src/git.xdrm.io/schastsp/client/keyset/keyset.go +++ b/src/git.xdrm.io/schastsp/client/keyset/keyset.go @@ -37,7 +37,7 @@ type Set struct { func Create(ctx *context.Context, max uint16) (*Set, error) { /* (1) Fail if min+thre >= max */ - if ctx.MinDepth()+ctx.DepthThreshold() >= max { + if max < ctx.MinDepth()+ctx.DepthThreshold() { return nil, errors.New("Maximum depth must be greater than Min+threshold (from given Context)") } @@ -143,7 +143,7 @@ func (s *Set) Decrement() uint16 { * network endianness -> big-endian * ---------------------------------------------------------*/ -func (s *Set) Write(writer io.Writer) error { +func (s *Set) Store(writer io.Writer) error { var err error; @@ -177,7 +177,7 @@ func (s *Set) Write(writer io.Writer) error { * | 16 bits | hsize bits | 16 bits | * ---------------------------------------------------------*/ -func (s *Set) Read(reader io.Reader) error { +func (s *Set) Fetch(reader io.Reader) error { var err error var secretLength uint16