Documentation ¶
Index ¶
- func Base64Decode(message []byte) (b []byte, err error)
- func ComparePassword(password string, hash string) bool
- func Decrypt(hash string, salt string) (string, error)
- func EncryptPassword(text string) (string, error)
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte) []byte
- func SetKey(newKey string)
- func SetKeyName(newName string)
- type DecryptableContainer
- type DecryptableData
- type EncryptableContainer
- type EncryptableData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func ComparePassword ¶
func EncryptPassword ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func SetKeyName ¶
func SetKeyName(newName string)
Types ¶
type DecryptableContainer ¶
type DecryptableContainer map[string]DecryptableData
func (DecryptableContainer) MarshalJSON ¶
func (dst DecryptableContainer) MarshalJSON() ([]byte, error)
func (*DecryptableContainer) Scan ¶
func (dst *DecryptableContainer) Scan(src interface{}) error
type DecryptableData ¶
func (DecryptableData) Decrypt ¶
func (e DecryptableData) Decrypt() string
type EncryptableContainer ¶
type EncryptableContainer map[string]EncryptableData
func (*EncryptableContainer) UnmarshalJSON ¶
func (dst *EncryptableContainer) UnmarshalJSON(b []byte) error
type EncryptableData ¶
func Encrypt ¶
func Encrypt(unencrypted string) (EncryptableData, error)
func (EncryptableData) Decrypt ¶
func (e EncryptableData) Decrypt() string
Click to show internal directories.
Click to hide internal directories.