encrypt

package
v0.0.0-...-c2f0dd3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DarkenPath

func DarkenPath(path string, key string) string

Return the path encrypted as it appears in the encrypted fs As we use JSON.Marshall to embed resource in fs and the resource name, which is the path encrypted, is a []byte it is encoded with base64 In that way , to obtain path as it appear in FS we encrypt it and then encode it using base64

func DecryptByte

func DecryptByte(data []byte, key string) []byte

func DecryptPath

func DecryptPath(encryptedPath string, key string) string

Decrypt a path of encrypted fs first it decode it using base64 and then decrypt it finally it convert it in a string

func DecryptStringFromUbac

func DecryptStringFromUbac(data string, key string) []byte

Decrypt String from ubac with the key As it is from ubac 'data' is a base64 encoded byte array

func Encrypt

func Encrypt(data []byte, key string) []byte

func EncryptFile

func EncryptFile(filename string, key string) []byte

func EncryptString

func EncryptString(filename string, key string) []byte

Encrypt a String

Types

This section is empty.

Jump to

Keyboard shortcuts

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