Documentation
¶
Index ¶
- type GoSm2
- func (gs *GoSm2) Decrypt(k *primitive.Sm2PrivateKey, ciphertext []byte, opts crypto.DecrypterOpts) ([]byte, error)
- func (gs *GoSm2) Encrypt(k *primitive.Sm2PublicKey, plaintext []byte) ([]byte, error)
- func (gs *GoSm2) Sign(k *primitive.Sm2PrivateKey, msg []byte, opts crypto.SignerOpts) ([]byte, error)
- func (gs *GoSm2) Sm2P256Curve() elliptic.Curve
- func (gs *GoSm2) Verify(k *primitive.Sm2PublicKey, sig, msg []byte, opts crypto.SignerOpts) (bool, error)
- type GoSm3
- type GoSm4
- type KeysDerive
- func (kd *KeysDerive) GenPrivateKey() (*primitive.Sm2PrivateKey, error)
- func (kd *KeysDerive) MarshalSm2PrivateKey(k *primitive.Sm2PrivateKey, pwd []byte) ([]byte, error)
- func (kd *KeysDerive) MarshalSm2PublicKey(k *primitive.Sm2PublicKey) ([]byte, error)
- func (kd *KeysDerive) ParsePKCS8PrivateKey(der, pwd []byte) (*primitive.Sm2PrivateKey, error)
- func (kd *KeysDerive) ParsePKCS8UnecryptedPrivateKey(der []byte) (*primitive.Sm2PrivateKey, error)
- func (kd *KeysDerive) ParseSm2PublicKey(der []byte) (*primitive.Sm2PublicKey, error)
- func (kd *KeysDerive) PublicKey(k *primitive.Sm2PrivateKey) *primitive.Sm2PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoSm2 ¶
type GoSm2 struct{}
func (*GoSm2) Decrypt ¶
func (gs *GoSm2) Decrypt(k *primitive.Sm2PrivateKey, ciphertext []byte, opts crypto.DecrypterOpts) ([]byte, error)
func (*GoSm2) Sign ¶
func (gs *GoSm2) Sign(k *primitive.Sm2PrivateKey, msg []byte, opts crypto.SignerOpts) ([]byte, error)
func (*GoSm2) Sm2P256Curve ¶
func (*GoSm2) Verify ¶
func (gs *GoSm2) Verify(k *primitive.Sm2PublicKey, sig, msg []byte, opts crypto.SignerOpts) (bool, error)
type KeysDerive ¶
type KeysDerive struct{}
func (*KeysDerive) GenPrivateKey ¶
func (kd *KeysDerive) GenPrivateKey() (*primitive.Sm2PrivateKey, error)
func (*KeysDerive) MarshalSm2PrivateKey ¶
func (kd *KeysDerive) MarshalSm2PrivateKey(k *primitive.Sm2PrivateKey, pwd []byte) ([]byte, error)
func (*KeysDerive) MarshalSm2PublicKey ¶
func (kd *KeysDerive) MarshalSm2PublicKey(k *primitive.Sm2PublicKey) ([]byte, error)
func (*KeysDerive) ParsePKCS8PrivateKey ¶
func (kd *KeysDerive) ParsePKCS8PrivateKey(der, pwd []byte) (*primitive.Sm2PrivateKey, error)
func (*KeysDerive) ParsePKCS8UnecryptedPrivateKey ¶
func (kd *KeysDerive) ParsePKCS8UnecryptedPrivateKey(der []byte) (*primitive.Sm2PrivateKey, error)
func (*KeysDerive) ParseSm2PublicKey ¶
func (kd *KeysDerive) ParseSm2PublicKey(der []byte) (*primitive.Sm2PublicKey, error)
func (*KeysDerive) PublicKey ¶
func (kd *KeysDerive) PublicKey(k *primitive.Sm2PrivateKey) *primitive.Sm2PublicKey
Click to show internal directories.
Click to hide internal directories.