Documentation
¶
Index ¶
- func ConvertPassphraseToKey(pass []byte) []byte
- func Decrypt(content []byte, key []byte) ([]byte, error)
- func DecryptWithPass(encryptedData, pass []byte) ([]byte, error)
- func Encrypt(message []byte, key []byte) ([]byte, error)
- func EncryptWithPass(data, pass []byte) ([]byte, error)
- func ReadFromDB(path string, dataStruct Serialiser, pass []byte) error
- func WriteToDB(path string, dataStruct Serialiser, pass []byte) error
- type Serialiser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPassphraseToKey ¶
func Decrypt ¶
Decrypt decrypts a content string using the shared secret key. The inverse operation to message -> Encrypt(message, key).
func DecryptWithPass ¶
func Encrypt ¶
Encrypt gotten from https://github.com/nbd-wtf/go-nostr/blob/master/nip04/nip04.go
func EncryptWithPass ¶
func ReadFromDB ¶
func ReadFromDB(path string, dataStruct Serialiser, pass []byte) error
ReadFromDB Reads data from a file and decrypts its content parsing it into the given Serialiser Interface.
Types ¶
Click to show internal directories.
Click to hide internal directories.