Documentation ¶
Index ¶
- func DecodeBase64(s string) []byte
- func Decrypt(block cipher.Block, key, value []byte) []byte
- func DecryptXOR(key []byte, value string) []byte
- func EncodeBase64(b []byte) string
- func Encrypt(block cipher.Block, key, text []byte) ([]byte, error)
- func EncryptXOR(key, value []byte) string
- func GobDecode(data []byte, values *map[string]interface{}) error
- func GobEncode(data map[string]interface{}) ([]byte, error)
- func RandomString(t string, l int) string
- func StrPad(input string, padLength int, padString string, padType string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase64 ¶
DecodeBase64 returns a decode base64 []byte from string.
func DecryptXOR ¶
DecryptXOR return a decrypted XORed string.
func EncodeBase64 ¶
EncodeBase64 returns an encoded base64 string from []byte.
func EncryptXOR ¶
EncryptXOR return a XORed encrypted string.
func RandomString ¶
func StrPad ¶
StrPad returns the input string padded on the left, right or both sides using padType to the specified padding length padLength.
Example: input := "Codes"; StrPad(input, 10, " ", "RIGHT") // produces "Codes " StrPad(input, 10, "-=", "LEFT") // produces "=-=-=Codes" StrPad(input, 10, "_", "BOTH") // produces "__Codes___" StrPad(input, 6, "___", "RIGHT") // produces "Codes_" StrPad(input, 3, "*", "RIGHT") // produces "Codes"
Types ¶
This section is empty.