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
+9.2k Golang : Go as a script or running go with shebang/hashbang style
+15.6k Golang : How to check if IP address is in range
+13.1k Golang : Convert IPv4 address to packed 32-bit binary format
+7.1k Mac OSX : Find large files by size
+6.4k Golang : Debug with Godebug
+7.5k Golang : Of hash table and hash map
+18.8k Golang : How to remove certain lines from a file
+22k Golang : Setting up/configure AWS credentials with official aws-sdk-go
+8.9k Golang : Set or add headers for many or different handlers
+15.1k Golang : Get URI segments by number and assign as variable example
+8.6k Golang : Count leading or ending zeros(any item of interest) example
+9.5k Golang : Generate Codabar