* add hash.go in crypto package

* add base32 / base64 in destination

* add helper functions for base64 / base32
This commit is contained in:
Jeff Becker
2016-01-28 15:32:09 -05:00
parent 4b583e7c0e
commit 45656d356f
4 changed files with 39 additions and 1 deletions

View File

@ -9,3 +9,9 @@ import (
// 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
}