Documentation ¶
Index ¶
- Variables
- func AesDecrypt(data []byte, key []byte) ([]byte, error)
- func AesEncrypt(data []byte, key []byte) ([]byte, error)
- func DecryptByAes(data string) ([]byte, error)
- func DecryptByinv(key, iv []byte, ciphertext string) (string, error)
- func EncryptByAes(data []byte) (string, error)
- func EncryptByinv(key, iv []byte, plaintext string) (string, error)
- func NaclDecrypt(box []byte, nonce [24]byte, secret [32]byte) ([]byte, error)
- func NaclEncrypt(message []byte, nonce [24]byte, secret [32]byte) ([]byte, error)
- func NewBlake2b256Sig(key, data []byte) ([]byte, error)
- func NewBlake2b512Sig(key, data []byte) ([]byte, error)
- func NewNaclKeyPair() ([32]byte, [64]byte, error)
- func NewNaclKeyPairFromSeed(seed []byte) ([32]byte, [64]byte, error)
- func NewXXHash(data []byte, bitLength int64) []byte
- func NewXXHash128(data []byte) [16]byte
- func NewXXHash256(data []byte) [32]byte
- func NewXXHash64(data []byte) [8]byte
- type Blake2b256Hash
- type Blake2b512Hash
- type Hash
- type Rsa
- func (r *Rsa) CreateKeys(keyLength int) (privateKey, publicKey string)
- func (r *Rsa) CreatePkcs8Keys(keyLength int) (privateKey, publicKey string)
- func (r *Rsa) Decrypt(data []byte) ([]byte, error)
- func (r *Rsa) Encrypt(data []byte) ([]byte, error)
- func (r *Rsa) Pkcs1ToPkcs8(key []byte) []byte
- func (r *Rsa) Sign(data []byte, sHash crypto.Hash) ([]byte, error)
- func (r *Rsa) Verify(data []byte, sign []byte, sHash crypto.Hash) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var PwdKey = []byte("123451231")
Functions ¶
func DecryptByAes ¶
func EncryptByAes ¶
func NaclDecrypt ¶
NaclDecrypt ... note: use pointers???
func NaclEncrypt ¶
NaclEncrypt ... note: use pointers???
func NewBlake2b256Sig ¶
NewBlake2b256Sig ...
func NewBlake2b512Sig ¶
NewBlake2b512Sig ...
func NewNaclKeyPairFromSeed ¶
NewNaclKeyPairFromSeed ... note: return pointers???
Types ¶
type Blake2b256Hash ¶
Blake2b256Hash ...
type Blake2b512Hash ¶
Blake2b512Hash ...
type Rsa ¶
type Rsa struct {
// contains filtered or unexported fields
}
func (*Rsa) CreateKeys ¶
func (*Rsa) CreatePkcs8Keys ¶
func (*Rsa) Pkcs1ToPkcs8 ¶
Click to show internal directories.
Click to hide internal directories.