{"modulePath":"github.com/mycontroller-org/server/v2","version":"v2.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package javascript_helper\n\n## Constants\n\n```go\nconst (\n\tKeyCryptoMD5    = \"md5\"\n\tKeyCryptoSHA1   = \"sha1\"\n\tKeyCryptoSHA256 = \"sha256\"\n\tKeyCryptoSHA512 = \"sha512\"\n)\n```\n\n```go\nconst (\n\tKeyMcUtils = \"mcUtils\"\n)\n```\n\n## Functions\n\n```go\nfunc GetHelperUtils() map[string]interface{}\n```\nincludes helper functions\n\n## Types\n\n```go\ntype Convert struct {\n}\n```\n\n```go\nfunc (ll *Convert) HexStringToBytes(data string) []byte\n```\nreturns bytes from hex string\n\n```go\nfunc (ll *Convert) HexStringToString(data string) string\n```\nreturns string from hex string\n\n```go\nfunc (ll *Convert) ToBytes(data string) []byte\n```\nreturns string to byte\n\n```go\nfunc (ll *Convert) ToHexString(data interface{}) string\n```\nreturns anything to hex string\n\n```go\nfunc (ll *Convert) ToInt16BE(bytes []byte) int16\n```\nToInt16BE converts a 2-byte big-endian slice to an int16, preserving the sign using two's complement representation.\n\n```go\nfunc (ll *Convert) ToInt16LE(bytes []byte) int16\n```\nToInt16LE converts a 2-byte little-endian slice to an int16, preserving the sign using two's complement representation.\n\n```go\nfunc (ll *Convert) ToInt32BE(bytes []byte) int32\n```\nToInt32BE converts a 4-byte big-endian slice to an int32, preserving the sign using two's complement representation.\n\n```go\nfunc (ll *Convert) ToInt32LE(bytes []byte) int32\n```\nToInt32LE converts a 4-byte little-endian slice to an int32, preserving the sign using two's complement representation.\n\n```go\nfunc (ll *Convert) ToInt64BE(bytes []byte) int64\n```\nToInt64BE converts an 8-byte big-endian slice to an int64, preserving the sign using two's complement representation.\n\n```go\nfunc (ll *Convert) ToInt64LE(bytes []byte) int64\n```\nToInt64LE converts an 8-byte little-endian slice to an int64, preserving the sign using two's complement representation.\n\n```go\nfunc (ll *Convert) ToString(data interface{}) string\n```\nreturns anything to string\n\n```go\nfunc (ll *Convert) ToStringFromBase64(data interface{}) string\n```\nreturns string from base64\n\n```go\nfunc (ll *Convert) ToUInt16BE(bytes []byte) uint16\n```\nToUInt16BE converts a 2-byte big-endian slice to a uint16.\n\n```go\nfunc (ll *Convert) ToUInt16LE(bytes []byte) uint16\n```\nToUInt16LE converts a 2-byte little-endian slice to a uint16.\n\n```go\nfunc (ll *Convert) ToUInt32BE(bytes []byte) uint32\n```\nToUInt32BE converts a 4-byte big-endian slice to a uint32.\n\n```go\nfunc (ll *Convert) ToUInt32LE(bytes []byte) uint32\n```\nToUInt32LE converts a 4-byte little-endian slice to a uint32.\n\n```go\nfunc (ll *Convert) ToUInt64BE(bytes []byte) uint64\n```\nToUInt64BE converts an 8-byte big-endian slice to a uint64.\n\n```go\nfunc (ll *Convert) ToUInt64LE(bytes []byte) uint64\n```\nToUInt64LE converts an 8-byte little-endian slice to a uint64.\n\n```go\ntype Crypto struct {\n}\n```\n\n```go\nfunc (c *Crypto) MD5Bytes(data string) [16]byte\n```\n\n```go\nfunc (c *Crypto) MD5HexString(data string) string\n```\n\n```go\nfunc (c *Crypto) Sha1Bytes(data string) [20]byte\n```\n\n```go\nfunc (c *Crypto) Sha1HexString(data string) string\n```\n\n```go\nfunc (c *Crypto) Sha256Bytes(data string) [32]byte\n```\n\n```go\nfunc (c *Crypto) Sha256HexString(data string) string\n```\n\n```go\nfunc (c *Crypto) Sha512Bytes(data string) [64]byte\n```\n\n```go\nfunc (c *Crypto) Sha512HexString(data string) string\n```\n\n```go\ntype HttpClient struct {\n}\n```\n\n```go\nfunc (hc *HttpClient) New(insecure bool, timeout string) *httpclient.Client\n```\n\n","path":"github.com/mycontroller-org/server/v2/pkg/utils/javascript/js_helper","name":"javascript_helper","synopsis":"","isRedistributable":true}
