safe

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 6 Imported by: 0

README

safe
----

A simple and intuitive way to encrypt and decrypt sensitive data.


USAGE

Use NewSafe to create a new entity. You can provide a 32 bytes key or get a random one created.
If you use a random key, you won't be able to decrypt your data if you lose access to the Safe
entity or the program is restarted, so it's very recommended you provide your own key.

Check out 'safe_test.go' for some examples.


INSTALLING

go get github.com/BiRabittoh/safe


LICENSE

safe is licensed under MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Safe

type Safe struct {
	// contains filtered or unexported fields
}

func NewSafe

func NewSafe(password string) *Safe

func (*Safe) Decrypt

func (s *Safe) Decrypt(ciphertextHex string) (string, error)

func (*Safe) Encrypt

func (s *Safe) Encrypt(plaintext string) string

Jump to

Keyboard shortcuts

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