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

19 lines
384 B
Go
Raw Normal View History

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