utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64UrlDecode

func Base64UrlDecode(data string) []byte

func Base64UrlEncode

func Base64UrlEncode(data []byte) string

func ByteLength

func ByteLength(bitLength int) int

func Concat

func Concat(array1, array2 []byte) []byte

func DecodeData added in v1.0.1

func DecodeData(data string, encodingType string) []byte

func EncodeData added in v1.0.1

func EncodeData(data []byte, encodingType string) string

func GetParent added in v1.2.0

func GetParent(path string) string

func GetPayloadToDecrypt added in v1.2.0

func GetPayloadToDecrypt(jsonPayload *gabs.Container, jsonPathIn string) string

func GetPayloadToEncrypt added in v1.2.0

func GetPayloadToEncrypt(jsonPayload *gabs.Container, jsonPathIn string) string

func HexUrlDecode added in v1.0.1

func HexUrlDecode(data string) []byte

func HexUrlEncode added in v1.0.1

func HexUrlEncode(data []byte) string

func IsNullOrEmpty added in v1.0.1

func IsNullOrEmpty(str string) bool

func LoadDecryptionKey

func LoadDecryptionKey(filePath, password string) (*rsa.PrivateKey, error)

LoadDecryptionKey from an Unencrypted Key File

func LoadEncryptionCertificate

func LoadEncryptionCertificate(certificatePath string) (*x509.Certificate, error)

Load certificate in both pem and der format

func LoadUnencryptedDecryptionKey

func LoadUnencryptedDecryptionKey(keyFilePath string) (*rsa.PrivateKey, error)

Load decryption key

func ParseReader

func ParseReader(r io.Reader) string

func RemoveRoot added in v1.2.0

func RemoveRoot(json string) string

func SubArray

func SubArray(byteArray []byte, beginIndex, length int) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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