encrypt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableEncoders

func AvailableEncoders() []string

AvailableEncoders retourne la liste des noms des hashes supportés

func DecryptAES

func DecryptAES(key, text string) (string, error)

DecryptAES déchiffre le texte d’entrée avec l’algorithme AES et la clé donnée

func Encode

func Encode(data string, algorithm string) string

Encode chiffre la donnée d‘entrée en utilisant l’algorithme demandé

func EncodePassword

func EncodePassword(plainpassword, algorithm string, saltLen ...int) (encodedPassword, generatedSalt string)

EncodePassword chiffre le mot de passe donné en entrée avec l’algorithme demandé Si une longueur de sel est définie, la fonction retourne également le sel (généré aléatoirement) utilisé pour le chiffrage.

func EncryptAES

func EncryptAES(key, text string) (string, error)

EncryptAES chiffre le texte d’entrée avec l’algorithme AES et la clé donnée

func IsEncoderAvailable

func IsEncoderAvailable(enc string) bool

IsEncoderAvailable vérifie si le nom fournit en entrée fait partie des hashes supportés

func Pad

func Pad(src []byte) []byte

func Unpad

func Unpad(src []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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