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
+51.9k Golang : How to get time in milliseconds?
+5.7k Get website traffic ranking with Similar Web or Alexa
+12k Golang : Clean formatting/indenting or pretty print JSON result
+11.9k Golang : Setup API server or gateway with Caddy and http.ListenAndServe() function example
+11.5k Use systeminfo to find out installed Windows Hotfix(s) or updates
+5.9k Golang : Detect variable or constant type
+5.6k Javascript : How to refresh page with JQuery ?
+5.2k Golang : Convert lines of string into list for delete and insert operation
+8.4k Golang : How to check if input string is a word?
+14.6k Golang : Missing Bazaar command
+14.4k Golang : How to filter a map's elements for faster lookup
+11.5k Golang : Handle API query by curl with Gorilla Queries example