Documentation
¶
Index ¶
- func AESDecryptItem(location string, rename string, keyString []byte, nonce []byte) error
- func AESEncryptionItem(location string, rename string, keyString string) ([]byte, error)
- func BytesToPrivateKey(priv []byte) *rsa.PrivateKey
- func BytesToPublicKey(pub []byte) *rsa.PublicKey
- func Compress(path string, name string) error
- func CreatePrivateEncryptFile(privateKey *rsa.PrivateKey) error
- func Decompress(path string) error
- func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
- func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
- func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
- func PublicKeyToBytes(pub *rsa.PublicKey) []byte
- func RSADecryptItem(keypath string, aes []byte, nonce []byte) ([]byte, []byte, error)
- func RSAEncryptItem(key string, publickey []byte, nonce []byte) ([]byte, []byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecryptItem ¶
Ecnrypts file at location given using private key path
func AESEncryptionItem ¶
Ecnrypts file at location given using private key path
func BytesToPrivateKey ¶
func BytesToPrivateKey(priv []byte) *rsa.PrivateKey
BytesToPrivateKey bytes to private key
func BytesToPublicKey ¶
BytesToPublicKey bytes to public key
func CreatePrivateEncryptFile ¶
func CreatePrivateEncryptFile(privateKey *rsa.PrivateKey) error
Creates the private key text file for the user
func Decompress ¶
Decompresses directory or folder and returns it to original state
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
DecryptWithPrivateKey decrypts data with private key
func EncryptWithPublicKey ¶
EncryptWithPublicKey encrypts data with public key
func GenerateKeyPair ¶
func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
GenerateKeyPair generates a new key pair
func PrivateKeyToBytes ¶
func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
PrivateKeyToBytes private key to bytes
func PublicKeyToBytes ¶
PublicKeyToBytes public key to bytes
func RSADecryptItem ¶
Decrypts file at location given using private key path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.