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

18 lines
385 B
Go
Raw Normal View History

2016-01-28 10:16:26 -05:00
//
// base64 encoding with i2p's alphabet
//
package base64
import (
2016-01-29 07:22:31 -05:00
b64 "encoding/base64"
2016-01-28 10:16:26 -05:00
)
// i2p base64 encoding
var I2PEncoding *b64.Encoding = b64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-~")
// wrapper arround encoding for encoding to string
func EncodeToString(data []byte) (str string) {
2016-01-29 07:22:31 -05:00
str = I2PEncoding.EncodeToString(data)
return
}