Documentation
¶
Index ¶
- func Argon2(pw []byte, salt []byte) []byte
- func Argon2Hash(pw []byte, salt []byte) string
- func Argon2Verify(hashed string, pw []byte) bool
- func Genkey(data []byte, lbl string, size int) ([]byte, error)
- func Pbkdf2(pw []byte, salt []byte, iter int, outsize int) []byte
- func Random(size int) []byte
- func SHA3256(data []byte) []byte
- func SHA3512(data []byte) []byte
- type AES1
- func (a *AES1) DeAESGCM(key []byte, data []byte) ([]byte, error)
- func (a *AES1) DeAESGCMx(key []byte, src io.Reader, size int64, dst io.Writer, chunkSize int) error
- func (a *AES1) EnAESGCM(key []byte, data []byte) ([]byte, error)
- func (a *AES1) EnAESGCMx(key []byte, src io.Reader, size int64, dst io.Writer, chunkSize int) error
- func (a *AES1) Init()
- func (a *AES1) Processed() int64
- type AsymMaster
- func (am *AsymMaster) Decrypt(data []byte) ([]byte, error)
- func (am *AsymMaster) Encrypt(data []byte) ([]byte, error)
- func (am *AsymMaster) Genkey() ([]byte, []byte, error)
- func (am *AsymMaster) Init(algo string) error
- func (am *AsymMaster) Loadkey(public []byte, private []byte) error
- func (am *AsymMaster) Sign(data []byte) ([]byte, error)
- func (am *AsymMaster) Verify(data []byte, signature []byte) bool
- type ECC1
- func (e *ECC1) Decrypt(data []byte) ([]byte, error)
- func (e *ECC1) Encrypt(data []byte) ([]byte, error)
- func (e *ECC1) Genkey() ([]byte, []byte, error)
- func (e *ECC1) Loadkey(public []byte, private []byte) error
- func (e *ECC1) Sign(data []byte) ([]byte, error)
- func (e *ECC1) Verify(data []byte, signature []byte) bool
- type HashMaster
- type Masker
- type PQC1
- func (p *PQC1) Decrypt(data []byte) ([]byte, error)
- func (p *PQC1) Encrypt(data []byte) ([]byte, error)
- func (p *PQC1) Genkey() ([]byte, []byte, error)
- func (p *PQC1) Loadkey(public []byte, private []byte) error
- func (p *PQC1) Sign(data []byte) ([]byte, error)
- func (p *PQC1) Verify(data []byte, signature []byte) bool
- type RSA1
- func (r *RSA1) Decrypt(data []byte) ([]byte, error)
- func (r *RSA1) Encrypt(data []byte) ([]byte, error)
- func (r *RSA1) Genkey(bits int) ([]byte, []byte, error)
- func (r *RSA1) Loadkey(public []byte, private []byte) error
- func (r *RSA1) Sign(data []byte) ([]byte, error)
- func (r *RSA1) Verify(data []byte, signature []byte) bool
- type SymMaster
- func (sm *SymMaster) AfterSize(size int64) int64
- func (sm *SymMaster) DeBin(data []byte) ([]byte, error)
- func (sm *SymMaster) DeFile(src io.Reader, size int64, dst io.Writer) error
- func (sm *SymMaster) EnBin(data []byte) ([]byte, error)
- func (sm *SymMaster) EnFile(src io.Reader, size int64, dst io.Writer) error
- func (sm *SymMaster) Init(algo string, key []byte) error
- func (sm *SymMaster) Processed() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Argon2Hash ¶
func Argon2Verify ¶
Types ¶
type AES1 ¶
type AES1 struct {
// contains filtered or unexported fields
}
========== AES Encryption ==========
func (*AES1) DeAESGCMx ¶
AES-GCM extended, 44B key (12B IV + 32B AES Key), default chunkSize=1048576
type AsymMaster ¶ added in v0.2.0
type AsymMaster struct {
Algo string // algo: "rsa1", "rsa2", "ecc1", "pqc1"
// contains filtered or unexported fields
}
========== Asymetric Encryption Master ==========
func (*AsymMaster) Decrypt ¶ added in v0.2.0
func (am *AsymMaster) Decrypt(data []byte) ([]byte, error)
func (*AsymMaster) Encrypt ¶ added in v0.2.0
func (am *AsymMaster) Encrypt(data []byte) ([]byte, error)
func (*AsymMaster) Genkey ¶ added in v0.2.0
func (am *AsymMaster) Genkey() ([]byte, []byte, error)
Generate key pair
func (*AsymMaster) Init ¶ added in v0.2.0
func (am *AsymMaster) Init(algo string) error
type ECC1 ¶
type ECC1 struct {
// X448 Keys (Encryption)
PrivX *x448.Key
PubX *x448.Key
// Ed448 Keys (Signing)
PrivEd ed448.PrivateKey
PubEd ed448.PublicKey
}
========== ECC Encryption ==========
type HashMaster ¶ added in v1.1.1
type HashMaster struct {
// contains filtered or unexported fields
}
========== Hash Function Master ==========
type PQC1 ¶ added in v1.1.1
type PQC1 struct {
// ECC Keys
PubX *x448.Key
PrivX *x448.Key
PubEd ed448.PublicKey
PrivEd ed448.PrivateKey
// PQC Key Bytes (Raw Bytes Storage)
PubKEM []byte
PrivKEM []byte
PubDSA []byte
PrivDSA []byte
// contains filtered or unexported fields
}
========== PQC1 Encryption ==========
type RSA1 ¶
type RSA1 struct {
Private *rsa.PrivateKey
Public *rsa.PublicKey
}
========== RSA Encryption ==========
Click to show internal directories.
Click to hide internal directories.