Documentation ¶
Index ¶
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func Auth(conf *config.VaultConfig, username, password string) (bool, bool)
- func GenPass(baseStr string, length int) (string, error)
- func ModifyAccount(conf *config.VaultConfig, username, password string) error
- func ModifyData(conf *config.VaultConfig, originKey, data []byte) error
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func RandSalt() ([]byte, error)
- func RangePersistData(conf *config.VaultConfig, f func(key, data []byte)) error
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesEncrypt的key必须为长度为32的字节数组(AES-256)
func AesEncrypt ¶
AesEncrypt的key必须为长度为32的字节数组(AES-256)
func Auth ¶
func Auth(conf *config.VaultConfig, username, password string) (bool, bool)
fixme deprecated
func ModifyAccount ¶
func ModifyAccount(conf *config.VaultConfig, username, password string) error
fixme deprecated
func ModifyData ¶
func ModifyData(conf *config.VaultConfig, originKey, data []byte) error
fixme deprecated
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func RangePersistData ¶
func RangePersistData(conf *config.VaultConfig, f func(key, data []byte)) error
fixme deprecated
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.