Documentation ¶
Index ¶
- type CMCrypt
- func (c *CMCrypt) Decrypt(enData []byte, key []byte, iv []byte) (data []byte, err error)
- func (c *CMCrypt) DecryptE(enData []byte, priKey []byte) (data []byte, err error)
- func (c *CMCrypt) Encrypt(data []byte, key []byte, iv []byte) (enData []byte, err error)
- func (c *CMCrypt) EncryptE(data []byte, pubKey []byte) (enData []byte, err error)
- func (c *CMCrypt) GenKey() (priKey []byte, pubKey []byte, err error)
- func (c *CMCrypt) Hash(data ...[]byte) []byte
- func (c *CMCrypt) MakeSyEnc(key []byte, iv []byte) *SyEnc
- func (c *CMCrypt) NewHash() hash.Hash
- func (c *CMCrypt) Sign(data []byte, priKey []byte) (signature []byte, err error)
- func (c *CMCrypt) Verify(data []byte, signature []byte, pubKey []byte) bool
- type Crypt
- type GMCrypt
- func (c *GMCrypt) Decrypt(enData []byte, key []byte, iv []byte) (data []byte, err error)
- func (c *GMCrypt) DecryptE(enData []byte, priKey []byte) (data []byte, err error)
- func (c *GMCrypt) Encrypt(data []byte, key []byte, iv []byte) (enData []byte, err error)
- func (c *GMCrypt) EncryptE(data []byte, pubKey []byte) (enData []byte, err error)
- func (c *GMCrypt) GenKey() (priKey []byte, pubKey []byte, err error)
- func (c *GMCrypt) Hash(data ...[]byte) []byte
- func (c *GMCrypt) MakeSyEnc(key []byte, iv []byte) *SyEnc
- func (c *GMCrypt) NewHash() hash.Hash
- func (c *GMCrypt) Sign(data []byte, priKey []byte) (signature []byte, err error)
- func (c *GMCrypt) Verify(data []byte, signature []byte, pubKey []byte) bool
- type SyEnc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMCrypt ¶
type CMCrypt struct { }
type Crypt ¶
type Crypt interface { Hash(data ...[]byte) []byte NewHash() hash.Hash Encrypt(data []byte, key []byte, iv []byte) (enData []byte, err error) Decrypt(enData []byte, key []byte, iv []byte) (data []byte, err error) MakeSyEnc(key []byte, iv []byte) *SyEnc GenKey() (priKey []byte, pubKey []byte, err error) Sign(data []byte, priKey []byte) (signature []byte, err error) Verify(data []byte, signature []byte, pubKey []byte) bool EncryptE(data []byte, pubKey []byte) (enData []byte, err error) DecryptE(enData []byte, priKey []byte) (data []byte, err error) }
type GMCrypt ¶
type GMCrypt struct { }
Click to show internal directories.
Click to hide internal directories.