util

package
v0.0.0-...-5cc0681 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

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

AesEncrypt的key必须为长度为32的字节数组(AES-256)

func AesEncrypt

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

AesEncrypt的key必须为长度为32的字节数组(AES-256)

func Auth

func Auth(conf *config.VaultConfig, username, password string) (bool, bool)

fixme deprecated

func GenPass

func GenPass(baseStr string, length int) (string, error)

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 PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func RandSalt

func RandSalt() ([]byte, error)

func RangePersistData

func RangePersistData(conf *config.VaultConfig, f func(key, data []byte)) error

fixme deprecated

func ZeroPadding

func ZeroPadding(ciphertext []byte, blockSize int) []byte

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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