Skip to content

autom8ter/gocrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocrypt

-- import "github.com/autom8ter/gocrypt"

Usage

type GoCrypt

type GoCrypt struct {
}

func NewGoCrypt

func NewGoCrypt() *GoCrypt

func (*GoCrypt) AddRemoteCache

func (g *GoCrypt) AddRemoteCache(provider RemoteProvider, endpoint, path, secretkeyring string) error

func (*GoCrypt) Adler32sum

func (g *GoCrypt) Adler32sum(input string) string

func (*GoCrypt) Base64Decode

func (g *GoCrypt) Base64Decode(str string) string

func (*GoCrypt) Base64DecodeRaw

func (g *GoCrypt) Base64DecodeRaw(str string) []byte

func (*GoCrypt) Base64Encode

func (g *GoCrypt) Base64Encode(str string) string

func (*GoCrypt) Base64EncodeRaw

func (g *GoCrypt) Base64EncodeRaw(str []byte) string

func (*GoCrypt) Bash

func (g *GoCrypt) Bash(cmd string) string

func (*GoCrypt) BuildCustomCertificate

func (g *GoCrypt) BuildCustomCertificate(b64cert string, b64key string) (*certificates.Certificate, error)

func (*GoCrypt) Cache

func (g *GoCrypt) Cache() *viper.Viper

func (*GoCrypt) Cron

func (g *GoCrypt) Cron() *cron.Cron

func (*GoCrypt) DecryptFiles

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 (*GoCrypt) DerivePassword

func (g *GoCrypt) DerivePassword(counter uint32, master_seed, site string, user, password string) string

func (*GoCrypt) EncryptFiles

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 (*GoCrypt) FS

func (g *GoCrypt) FS() *afero.Afero

func (*GoCrypt) GenerateCertificateAuthority

func (g *GoCrypt) GenerateCertificateAuthority(cn string, daysValid int) (*certificates.Certificate, error)

func (*GoCrypt) GeneratePrivateKey

func (g *GoCrypt) GeneratePrivateKey(typ keys.KeyType) string

func (*GoCrypt) GenerateSelfSignedCertificate

func (g *GoCrypt) GenerateSelfSignedCertificate(cn string, ips []interface{}, alternateDNS []interface{}, daysValid int) (certificates.Certificate, error)

func (*GoCrypt) GenerateSignedCertificate

func (g *GoCrypt) GenerateSignedCertificate(cn string, ips []interface{}, alternateDNS []interface{}, daysValid int, ca certificates.Certificate) (certificates.Certificate, error)

func (*GoCrypt) GetEnv

func (g *GoCrypt) GetEnv() []string

func (*GoCrypt) KeyLog

func (g *GoCrypt) KeyLog(output afero.File)

func (*GoCrypt) Load

func (g *GoCrypt) Load() *load.Client

func (*GoCrypt) PrettyJson

func (g *GoCrypt) PrettyJson(v interface{}) string

PrettyJson encodes an item into a pretty (indented) JSON string

func (*GoCrypt) Prompt

func (g *GoCrypt) Prompt(r io.Reader, question string) string

func (*GoCrypt) PromptPassword

func (g *GoCrypt) PromptPassword(prompt string) string

PromptPassword prompts user for password input.

func (*GoCrypt) Python3

func (g *GoCrypt) Python3(cmd string) string

func (*GoCrypt) RandomToken

func (g *GoCrypt) RandomToken(length int) []byte

func (*GoCrypt) RegExFind

func (g *GoCrypt) RegExFind(exp string, targ string) string

func (*GoCrypt) RegExFindAll

func (g *GoCrypt) RegExFindAll(exp string, find string, num int) []string

func (*GoCrypt) RegExMatch

func (g *GoCrypt) RegExMatch(exp string, match string) bool

func (*GoCrypt) RegExReplace

func (g *GoCrypt) RegExReplace(exp string, replace string, with string) string

func (*GoCrypt) RegExSplit

func (g *GoCrypt) RegExSplit(exp string, find string, num int) []string

func (*GoCrypt) RemoveAllFiles

func (g *GoCrypt) RemoveAllFiles(path string) error

func (*GoCrypt) Render

func (g *GoCrypt) Render(t string, data interface{}) (string, error)

func (*GoCrypt) Sha1sum

func (g *GoCrypt) Sha1sum(input string) string

func (*GoCrypt) Sha256sum

func (g *GoCrypt) Sha256sum(input string) string

func (*GoCrypt) Shell

func (g *GoCrypt) Shell(cmd string) string

func (*GoCrypt) StartDDOS

func (g *GoCrypt) StartDDOS(d *dos.DDOS)

func (*GoCrypt) StopDDOS

func (g *GoCrypt) StopDDOS(d *dos.DDOS)

func (*GoCrypt) Uuidv4

func (g *GoCrypt) Uuidv4() string

func (*GoCrypt) Walk

func (g *GoCrypt) Walk(path string, walkFunc filepath.WalkFunc) error

type RemoteProvider

type RemoteProvider int
const (
	Consul RemoteProvider = iota
	Etcd
)

func (RemoteProvider) String

func (r RemoteProvider) String() string

Releases

No releases published

Packages

No packages published

Languages