Documentation ¶
Index ¶
- Constants
- Variables
- func AESDecrypt(key []byte, iv []byte, buf []byte) ([]byte, error)
- func AESDecryptBase64(keyBase64 string, iv []byte, buf []byte) error
- func AESEncrypt(key, plaintext []byte) ([]byte, error)
- func DecodeCipherTag(dlf []byte) ([]byte, error)
- func DecryptDLF(data []byte) ([]byte, error)
- func GetDLFAuto(contentID string) ([]byte, error)
- func GetOoaHash(data []byte) []byte
- func HashDirectory(folder string) (map[string]string, error)
- func Murmur3X64_128Hash(seed int, str string) uint64
- func Murmur3X86_128Hash(seed int, str string) uint32
- func Murmur3X86_32Hash(seed int, str string) uint32
- func NewCRC32(filePath string) (string, error)
- func NewCRC64(filePath string) (string, error)
- func NewHash(filePath string, hash hash.Hash) (string, error)
- func NewMD5(filePath string) (string, error)
- func NewSHA1(filePath string) (string, error)
- func NewSHA256(filePath string) (string, error)
- func NewSHA512(filePath string) (string, error)
- func Validate(filePath, fileHash string, hash hash.Hash) error
- type DiffData
- type DiffHashData
- type DiffLocalData
Constants ¶
View Source
const ( CipherTag = "<CipherKey>" Base64_16Len = 24 )
Variables ¶
View Source
var DlfKey = []byte{
65, 50, 114, 45, 208, 130, 239, 176, 220, 100, 87, 197, 118, 104, 202, 9,
}
View Source
var IV = make([]byte, 16) //nolint:gochecknoglobals,mnd // wontfix
Functions ¶
func AESEncrypt ¶
func DecodeCipherTag ¶
func DecryptDLF ¶
func GetDLFAuto ¶
func GetOoaHash ¶
func Murmur3X64_128Hash ¶
func Murmur3X86_128Hash ¶
func Murmur3X86_32Hash ¶
Types ¶
type DiffData ¶
type DiffData struct { Hashes DiffHashData Local DiffLocalData }
type DiffHashData ¶
type DiffLocalData ¶
Click to show internal directories.
Click to hide internal directories.