crypto

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(formattedCipherText, key, keyId string) (string, error)

func Encrypt

func Encrypt(text, key, keyId string) (string, error)

format encrypted text , keyId is first 6 chars of hashed(sha256) signing key {{key-id}}${{algo}}${{encrypted-value}} example: e67gef$aes256$adsad321424324fdsdfs3Rddi90oP34xV

func GenerateKeyId

func GenerateKeyId(key string) (string, error)

keyId is first 6 chars of hashed(sha256) signing key

func GenerateRandomKeyString

func GenerateRandomKeyString(keySize int) (string, error)

func IsTextEncrypted

func IsTextEncrypted(formattedCipherText, key, keyId string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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