Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/iglake/go-multihash
Browse files Browse the repository at this point in the history
  • Loading branch information
iglake committed Jun 21, 2019
2 parents 0e239d8 + aa3ea05 commit 0e9b0c5
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/multiformats/go-multihash
module github.com/iglake/go-multihash

require (
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1
Expand Down
4 changes: 2 additions & 2 deletions multihash/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"io"
"os"

mh "github.com/multiformats/go-multihash"
mhopts "github.com/multiformats/go-multihash/opts"
mh "github.com/iglake/go-multihash"
mhopts "github.com/iglake/go-multihash/opts"
)

var usage = `usage: %s [options] [FILE]
Expand Down
2 changes: 1 addition & 1 deletion opts/coding.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"

base58 "github.com/mr-tron/base58/base58"
mh "github.com/multiformats/go-multihash"
mh "github.com/iglake/go-multihash"
)

func Decode(encoding, digest string) (mh.Multihash, error) {
Expand Down
2 changes: 1 addition & 1 deletion opts/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sort"
"strings"

mh "github.com/multiformats/go-multihash"
mh "github.com/iglake/go-multihash"
)

// package errors
Expand Down
54 changes: 54 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"author": "iglake",
"bugs": {
"url": "https://github.com/iglake/go-multihash/issues"
},
"gx": {
"dvcsimport": "github.com/iglake/go-multihash"
},
"gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmW7VUmSvhvSGbYbdsh7uRjhGmsYkc9fL8aJ5CorxxrU5N",
"name": "go-crypto",
"version": "0.2.1"
},
{
"author": "mr-tron",
"hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY",
"name": "go-base58-fast",
"version": "0.1.1"
},
{
"author": "whyrusleeping",
"hash": "QmZtJMfZZvoD3EKpQaf8xsFi83HMtX5acQekY8exMbcWEi",
"name": "keccakpg",
"version": "0.0.1"
},
{
"author": "minio",
"hash": "QmcTzQXRcU2vf8yX5EEboz1BSvWC7wWmeYAKVQmhp8WZYU",
"name": "sha256-simd",
"version": "0.1.2"
},
{
"author": "minio",
"hash": "QmZp3eKdYQHHAneECmeK6HhiMwTPufmjC8DuuaGKv3unvx",
"name": "blake2b-simd",
"version": "0.1.1"
},
{
"author": "whyrusleeping",
"hash": "QmWAXZgFyppTRshtnVHJ8LnA1yoHjUr41ZnsWPoA8wnSgF",
"name": "hashland-murmur3",
"version": "0.0.1"
}
],
"gxVersion": "0.9.0",
"language": "go",
"license": "MIT",
"name": "go-multihash",
"releaseCmd": "git commit -a -m \"gx release $VERSION\"",
"version": "1.0.11-ml"
}

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 equal to the length of the data (%d)",
// length, len(data))
//
// }
return data, nil
}

Expand Down

0 comments on commit 0e9b0c5

Please sign in to comment.