utils

package
v4.0.0-beta.5+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptString

func DecryptString(cipherKey string, message string) (
	retVal interface{}, err error)

DecryptString decodes encrypted string using the cipherKey

It accepts the following parameters: cipherKey: cipher key to use to decrypt. message: to encrypted.

returns the unencoded encrypted string, error if any.

func EncryptString

func EncryptString(cipherKey string, message string) string

EncryptString creates the base64 encoded encrypted string using the cipherKey. It accepts the following parameters: cipherKey: cipher key to use to encrypt. message: to encrypted.

returns the base64 encoded encrypted string.

func GetHmacSha256

func GetHmacSha256(secretKey string, input string) string

getHmacSha256 creates the cipher key hashed against SHA256. It accepts the following parameters: secretKey: the secret key. input: input to hash.

returns the hash.

func JoinChannels

func JoinChannels(channels []string) []byte

TODO: return string

func PamEncode

func PamEncode(value string) string

func PreparePamParams

func PreparePamParams(params *url.Values) string

func QueryToString

func QueryToString(query *url.Values) string

func UrlEncode

func UrlEncode(s string) string

TODO: verify the helper is used where supposed to

func Uuid

func Uuid() string

Generate a random uuid string

func ValueAsString

func ValueAsString(value interface{}) ([]byte, error)

PubNub - specific serializer

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL