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
+10.7k Golang : Get currencies exchange rates example
+4.6k JavaScript : Rounding number to decimal formats to display currency
+34.6k Golang : How to stream file to client(browser) or write to http.ResponseWriter?
+6.7k Golang : Skip or discard items of non-interest when iterating example
+8.5k Golang : How to check variable or object type during runtime?
+33.7k Golang : All update packages with go get command
+16.4k Golang : How to implement two-factor authentication?
+21.8k Golang : Upload big file (larger than 100MB) to AWS S3 with multipart upload
+13.8k Golang : Convert spaces to tabs and back to spaces example
+10.3k Golang : Convert file content to Hex
+18.2k Golang : Get path name to current directory or folder
+23.1k Golang : Randomly pick an item from a slice/array example