Golang encoding/base32.Encoding.EncodeToString function example
package encoding/base32
EncodeToString returns the base32 encoding of the given input source.
Golang encoding/base32.Encoding.EncodeToString function usage example
hash := sha1.New()
hash.Write([]byte("abcd"))
var simpleSubdomainSafeEncoding = base32.NewEncoding("0123456789abcdefghijklmnopqrstuv")
sha := simpleSubdomainSafeEncoding.EncodeToString(hash.Sum(nil))
Reference :
http://golang.org/pkg/encoding/base32/#Encoding.EncodeToString
Advertisement
Something interesting
Tutorials
+7.3k Golang : How to iterate a slice without using for loop?
+6k Linux/MacOSX : Search for files by filename and extension with find command
+7.2k Ubuntu : connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream
+7.7k Gogland : Where to put source code files in package directory for rookie
+17k Golang : Get input from keyboard
+9.6k Golang : Copy map(hash table) example
+7.4k Linux : How to fix Brother HL-1110 printing blank page problem
+6k Fontello : How to load and use fonts?
+6.7k Golang : Output or print out JSON stream/encoded data
+13.4k Golang : Generate Code128 barcode
+8.6k Golang : Add text to image and get OpenCV's X, Y co-ordinates example