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