Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
42839924
Commit
42839924
authored
Apr 05, 2019
by
idk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the validator
parent
ae5c4f83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
transcoders.go
transcoders.go
+3
-3
No files found.
transcoders.go
View file @
42839924
...
...
@@ -283,9 +283,9 @@ func garlic32BtS(b []byte) (string, error) {
func
garlic32Validate
(
b
[]
byte
)
error
{
// an i2p base64 for an Encrypted Leaseset v2 will be at least 35 bytes
// long
if
len
(
b
)
>
35
{
// other than that, they will be
at least
32 bytes
if
len
(
b
)
<
32
{
if
len
(
b
)
<
35
{
// other than that, they will be
exactly
32 bytes
if
len
(
b
)
!=
32
{
return
fmt
.
Errorf
(
"failed to validate garlic addr: %s not an i2p base32 address. len: %d
\n
"
,
b
,
len
(
b
))
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment