mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-04 13:32:52 -04:00
18 lines
354 B
Go
18 lines
354 B
Go
//
|
|
// base32 encoding using i2p's alphabet
|
|
//
|
|
package base32
|
|
|
|
import (
|
|
b32 "encoding/base32"
|
|
)
|
|
|
|
// i2p base32 encoding
|
|
var I2PEncoding *b32.Encoding = b32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567")
|
|
|
|
// wrapper arround encoding for encoding to string
|
|
func EncodeToString(data []byte) (str string) {
|
|
str = I2PEncoding.EncodeToString(data)
|
|
return
|
|
}
|