mirror of
https://github.com/go-i2p/goSam.git
synced 2025-07-13 14:18:25 -04:00
fix base32 calculation
This commit is contained in:
@ -92,11 +92,11 @@ func (c *Client) Destination() string {
|
||||
// Base32 returns the base32 of the local tunnel
|
||||
func (c *Client) Base32() string {
|
||||
hash := sha256.New()
|
||||
b64, err := i2pB64enc.DecodeString(c.Base64())
|
||||
b64, err := i2pB64enc.DecodeString(c.Base64())
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
hash.Write([]byte(b64))
|
||||
hash.Write([]byte(b64))
|
||||
return strings.ToLower(strings.Replace(i2pB32enc.EncodeToString(hash.Sum(nil)), "=", "", -1))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user