Skip to content

Commit

Permalink
get master w/ the new sumId
Browse files Browse the repository at this point in the history
  • Loading branch information
iglake committed Jul 1, 2019
1 parent 0e9b0c5 commit 8eb7b44
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func sumBlake2b(data []byte, size int) ([]byte, error) {
}

func sumID(data []byte, length int) ([]byte, error) {
// if length >= 0 && length != len(data) {
// return nil, fmt.Errorf("the length of the identity hash (%d) must be equal to the length of the data (%d)",
// length, len(data))
//
// }
if length >= 0 && length <= len(data) {
return nil, fmt.Errorf("the length of the identity hash (%d) must be smaller or equal to the length of the data (%d)",
length, len(data))

}
return data, nil
}

Expand Down

0 comments on commit 8eb7b44

Please sign in to comment.