Skip to content

Commit

Permalink
switch to Base64Url encoding for certhashes
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Jun 20, 2022
1 parent db19e64 commit adec851
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion multiaddr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func TestRoundTrip(t *testing.T) {
"/ip4/127.0.0.1/tcp/123/tls",
"/ip4/127.0.0.1/udp/123",
"/ip4/127.0.0.1/udp/123/ip6/::",
"/ip4/127.0.0.1/udp/1234/quic/webtransport/certhash/zQmbWTwYGcmdyK9CYfNBcfs9nhZs17a6FQ4Y8oea278xx41",
"/ip4/127.0.0.1/udp/1234/quic/webtransport/certhash/uEiDDq4_xNyDorZBH3TlGazyJdOWSwvo4PUo5YHFMrvDE8g",
"/p2p/QmbHVEEepCi7rn7VL7Exxpd2Ci9NNB6ifvqwhsrbRMgQFP",
"/p2p/QmbHVEEepCi7rn7VL7Exxpd2Ci9NNB6ifvqwhsrbRMgQFP/unix/a/b/c",
} {
Expand Down
2 changes: 1 addition & 1 deletion transcoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,5 @@ func certHashStB(s string) ([]byte, error) {
}

func certHashBtS(b []byte) (string, error) {
return multibase.Encode(multibase.Base58BTC, b)
return multibase.Encode(multibase.Base64url, b)
}

0 comments on commit adec851

Please sign in to comment.