encryption

package
v1.216.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt added in v1.66.0

func Decrypt(ciphertext string, key string) (string, error)

func DecryptByteArray added in v1.122.0

func DecryptByteArray(encryptedByteArray []byte, key string, object any) error

func DecryptStruct added in v1.70.0

func DecryptStruct(encryptedStruct string, key string, object any) error

func Encrypt added in v1.66.0

func Encrypt(plaintext string, key string) (string, error)

func EncryptByteArray added in v1.122.0

func EncryptByteArray(byteArray []byte, key string) (string, error)

func EncryptStruct added in v1.70.0

func EncryptStruct(object any, key string) (string, error)

func GenerateHashFromObject added in v1.109.0

func GenerateHashFromObject(object any, secret string) (string, error)

GenerateHashFromObject using HMAC with SHA-256

func GetBobAPIAuthEncryptionKey added in v1.116.0

func GetBobAPIAuthEncryptionKey(secretID string, isDebug bool) (string, error)

func GetBobGoEncryptionKey added in v1.149.0

func GetBobGoEncryptionKey(secretID string, isDebug bool) (string, error)

func GetFirebaseCredentialsEncryptionKey added in v1.97.0

func GetFirebaseCredentialsEncryptionKey(secretID string, isDebug bool) (string, error)

func GetGenericEncryptionKey added in v1.118.0

func GetGenericEncryptionKey(secretID string, isDebug bool) (string, error)

func GetJWTEncryptionKey added in v1.97.0

func GetJWTEncryptionKey(secretID string, isDebug bool) (string, error)

func GetShipLogicPINEncryptionKey added in v1.158.0

func GetShipLogicPINEncryptionKey(secretID string, isDebug bool) (string, error)

func Hash

func Hash(input string, key string) string

func Md5HashString

func Md5HashString(bytesToHash []byte) string

Types

type EncryptionKeys added in v1.97.0

type EncryptionKeys struct {
	FirebaseEncryptionKey     string `json:"firebase_encryption_key"`
	JWTEncryptionKey          string `json:"jwt_encryption_key"`
	BobAPIAuthEncryptionKey   string `json:"bob_api_auth_encryption_key"`
	GenericEncryptionKey      string `json:"generic_encryption_key"`
	BobGoEncryptionKey        string `json:"bobgo_encryption_key"`
	ShipLogicPINEncryptionKey string `json:"ship_logic_pin_encryption_key"`
}

func GetEncryptionKeys added in v1.97.0

func GetEncryptionKeys(secretID string, isDebug bool) (EncryptionKeys, error)

type EncryptionKeysSecret added in v1.97.0

type EncryptionKeysSecret struct {
	EncryptionKeysValue string `json:"EncryptionKeys"`
}

Jump to

Keyboard shortcuts

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