Files
go-i2p/lib/common/base32/base32.go

19 lines
352 B
Go
Raw Normal View History

2016-01-28 10:16:26 -05:00
//
2016-02-06 02:06:27 -08:00
// base32 encoding using I2P's alphabet
2016-01-28 10:16:26 -05:00
//
package base32
import (
2016-01-29 07:22:31 -05:00
b32 "encoding/base32"
2016-01-28 10:16:26 -05:00
)
var I2PEncoding *b32.Encoding = b32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567")
2016-02-06 02:06:27 -08:00
//
// Return a go string of the I2P base32
// encoding of the provided byte slice
//
func EncodeToString(data []byte) string {
return I2PEncoding.EncodeToString(data)
}