-- import "github.com/autom8ter/gocrypt"
type GoCrypt struct {
}
func NewGoCrypt() *GoCrypt
func (g *GoCrypt) AddRemoteCache(provider RemoteProvider, endpoint, path, secretkeyring string) error
func (g *GoCrypt) Adler32sum(input string) string
func (g *GoCrypt) Base64Decode(str string) string
func (g *GoCrypt) Base64DecodeRaw(str string) []byte
func (g *GoCrypt) Base64Encode(str string) string
func (g *GoCrypt) Base64EncodeRaw(str []byte) string
func (g *GoCrypt) Bash(cmd string) string
func (g *GoCrypt) BuildCustomCertificate(b64cert string, b64key string) (*certificates.Certificate, error)
func (g *GoCrypt) Cache() *viper.Viper
func (g *GoCrypt) Cron() *cron.Cron
func (g *GoCrypt) DecryptFiles(path string, myKey string, perm os.FileMode, skip ...string) error
DecryptFiles Walks documments in a path and encript or decrypts them.
func (g *GoCrypt) DerivePassword(counter uint32, master_seed, site string, user, password string) string
func (g *GoCrypt) EncryptFiles(path string, myKey string, perm os.FileMode, skip ...string) error
EncryptFiles Walks documments in a path and encript or decrypts them.
func (g *GoCrypt) FS() *afero.Afero
func (g *GoCrypt) GenerateCertificateAuthority(cn string, daysValid int) (*certificates.Certificate, error)
func (g *GoCrypt) GeneratePrivateKey(typ keys.KeyType) string
func (g *GoCrypt) GenerateSelfSignedCertificate(cn string, ips []interface{}, alternateDNS []interface{}, daysValid int) (certificates.Certificate, error)
func (g *GoCrypt) GenerateSignedCertificate(cn string, ips []interface{}, alternateDNS []interface{}, daysValid int, ca certificates.Certificate) (certificates.Certificate, error)
func (g *GoCrypt) GetEnv() []string
func (g *GoCrypt) KeyLog(output afero.File)
func (g *GoCrypt) Load() *load.Client
func (g *GoCrypt) PrettyJson(v interface{}) string
PrettyJson encodes an item into a pretty (indented) JSON string
func (g *GoCrypt) Prompt(r io.Reader, question string) string
func (g *GoCrypt) PromptPassword(prompt string) string
PromptPassword prompts user for password input.
func (g *GoCrypt) Python3(cmd string) string
func (g *GoCrypt) RandomToken(length int) []byte
func (g *GoCrypt) RegExFind(exp string, targ string) string
func (g *GoCrypt) RegExFindAll(exp string, find string, num int) []string
func (g *GoCrypt) RegExMatch(exp string, match string) bool
func (g *GoCrypt) RegExReplace(exp string, replace string, with string) string
func (g *GoCrypt) RegExSplit(exp string, find string, num int) []string
func (g *GoCrypt) RemoveAllFiles(path string) error
func (g *GoCrypt) Render(t string, data interface{}) (string, error)
func (g *GoCrypt) Sha1sum(input string) string
func (g *GoCrypt) Sha256sum(input string) string
func (g *GoCrypt) Shell(cmd string) string
func (g *GoCrypt) StartDDOS(d *dos.DDOS)
func (g *GoCrypt) StopDDOS(d *dos.DDOS)
func (g *GoCrypt) Uuidv4() string
func (g *GoCrypt) Walk(path string, walkFunc filepath.WalkFunc) error
type RemoteProvider int
const (
Consul RemoteProvider = iota
Etcd
)
func (r RemoteProvider) String() string