crypt

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesToString

func AesToString(wallet types.Wallet, pubKey *ecies.PublicKey, key []byte, iv []byte) (string, error)

func ConvertFromEncryptedFile

func ConvertFromEncryptedFile(data []byte, key []byte, iv []byte) (*types.File, error)

func ConvertToEncryptedFile

func ConvertToEncryptedFile(workingFile *types.File, key []byte, iv []byte) (*types.File, error)

func Decrypt

func Decrypt(cipherText []byte, encKey []byte, iv []byte) ([]byte, error)

func Encrypt

func Encrypt(plaintext []byte, key []byte, iv []byte) ([]byte, error)

func GenIv

func GenIv() []byte

func GenKey

func GenKey() []byte

func HashAndHex

func HashAndHex(input string) string

func HexFullPath

func HexFullPath(path string, fileName string) string

func MerkleMeBro

func MerkleMeBro(rawpath string) string

func PKCS5Padding

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

func RemovePKCS5Padding

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

func StringToAes

func StringToAes(wallet types.Wallet, source string) (iv []byte, key []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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