mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-06 06:24:20 -04:00
encoding comments
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
//
|
||||
// base64 encoding with i2p's alphabet
|
||||
// base64 encoding using I2P's alphabet
|
||||
//
|
||||
package base64
|
||||
|
||||
@ -7,11 +7,12 @@ import (
|
||||
b64 "encoding/base64"
|
||||
)
|
||||
|
||||
// i2p base64 encoding
|
||||
var I2PEncoding *b64.Encoding = b64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-~")
|
||||
|
||||
// wrapper arround encoding for encoding to string
|
||||
func EncodeToString(data []byte) (str string) {
|
||||
str = I2PEncoding.EncodeToString(data)
|
||||
return
|
||||
//
|
||||
// Return a go string of the I2P base64
|
||||
// encoding of the provided byte slice
|
||||
//
|
||||
func EncodeToString(data []byte) string {
|
||||
return I2PEncoding.EncodeToString(data)
|
||||
}
|
||||
|
Reference in New Issue
Block a user