gitea: Index | Files

package secret

import ""


Package Files


func AesDecrypt Uses

func AesDecrypt(key, text []byte) ([]byte, error)

AesDecrypt decrypts text and given key with AES.

func AesEncrypt Uses

func AesEncrypt(key, text []byte) ([]byte, error)

AesEncrypt encrypts text and given key with AES.

func DecryptSecret Uses

func DecryptSecret(key string, cipherhex string) (string, error)

DecryptSecret decrypts a previously encrypted hex string

func EncryptSecret Uses

func EncryptSecret(key string, str string) (string, error)

EncryptSecret encrypts a string with given key into a hex string

func New Uses

func New() (string, error)

New creats a new secret

func NewWithLength Uses

func NewWithLength(length int64) (string, error)

NewWithLength creates a new secret for a given length

Package secret imports 8 packages (graph) and is imported by 3 packages. Updated 2021-01-22. Refresh now. Tools for package owners.