Documentation
¶
Index ¶
- func PrintECDSABase64()
- type Cipher
- type EcdhObject
- func (self *EcdhObject) CreateECDH() error
- func (self *EcdhObject) Decrypt(msg string, aad []byte) ([]byte, error)
- func (self *EcdhObject) Encrypt(msg, aad []byte) (string, error)
- func (self *EcdhObject) GetPrivateKey() (interface{}, string)
- func (self *EcdhObject) GetPublicKey() (interface{}, string)
- func (self *EcdhObject) LoadS256ECC(b64 string) error
- func (self *EcdhObject) Sign(msg []byte) ([]byte, error)
- func (self *EcdhObject) Verify(msg, sign []byte) error
- type EcdsaObject
- func (self *EcdsaObject) CreateS256ECDSA() error
- func (self *EcdsaObject) Decrypt(msg string, aad []byte) ([]byte, error)
- func (self *EcdsaObject) Encrypt(msg, aad []byte) (string, error)
- func (self *EcdsaObject) GetPrivateKey() (interface{}, string)
- func (self *EcdsaObject) GetPublicKey() (interface{}, string)
- func (self *EcdsaObject) LoadS256ECDSA(b64 string) error
- func (self *EcdsaObject) Sign(msg []byte) ([]byte, error)
- func (self *EcdsaObject) Verify(msg, sign []byte) error
- type RsaObj
- func (self *RsaObj) CreateRsa1024() error
- func (self *RsaObj) CreateRsa2048() error
- func (self *RsaObj) CreateRsaFile(keyfile, pemfile string) error
- func (self *RsaObj) CreateRsaFileBase64(b ...int) error
- func (self *RsaObj) CreateRsaPemFile(pemfile string) error
- func (self *RsaObj) Decrypt(msg string, aad []byte) ([]byte, error)
- func (self *RsaObj) Encrypt(msg, aad []byte) (string, error)
- func (self *RsaObj) GetPrivateKey() (interface{}, string)
- func (self *RsaObj) GetPublicKey() (interface{}, string)
- func (self *RsaObj) LoadRsaFile(filePath string) error
- func (self *RsaObj) LoadRsaKeyFileBase64(fileBase64 string) error
- func (self *RsaObj) LoadRsaPemFile(filePath string) error
- func (self *RsaObj) LoadRsaPemFileBase64(fileBase64 string) error
- func (self *RsaObj) Sign(msg []byte) ([]byte, error)
- func (self *RsaObj) Verify(msg, sign []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintECDSABase64 ¶ added in v1.1.0
func PrintECDSABase64()
Types ¶
type EcdhObject ¶ added in v1.1.0
type EcdhObject struct {
// 16字节string字段组
PrivateKeyBase64 string
PublicKeyBase64 string
// contains filtered or unexported fields
}
func (*EcdhObject) CreateECDH ¶ added in v1.1.0
func (self *EcdhObject) CreateECDH() error
func (*EcdhObject) Decrypt ¶ added in v1.1.0
func (self *EcdhObject) Decrypt(msg string, aad []byte) ([]byte, error)
func (*EcdhObject) Encrypt ¶ added in v1.1.0
func (self *EcdhObject) Encrypt(msg, aad []byte) (string, error)
func (*EcdhObject) GetPrivateKey ¶ added in v1.1.0
func (self *EcdhObject) GetPrivateKey() (interface{}, string)
func (*EcdhObject) GetPublicKey ¶ added in v1.1.0
func (self *EcdhObject) GetPublicKey() (interface{}, string)
func (*EcdhObject) LoadS256ECC ¶ added in v1.1.0
func (self *EcdhObject) LoadS256ECC(b64 string) error
func (*EcdhObject) Verify ¶ added in v1.1.0
func (self *EcdhObject) Verify(msg, sign []byte) error
type EcdsaObject ¶ added in v1.1.0
type EcdsaObject struct {
// 16字节string字段组
PrivateKeyBase64 string
PublicKeyBase64 string
// contains filtered or unexported fields
}
func CreateS256ECDSAWithBase64 ¶ added in v1.1.0
func CreateS256ECDSAWithBase64(prkB64, pubB64 string) (*EcdsaObject, error)
func (*EcdsaObject) CreateS256ECDSA ¶ added in v1.1.0
func (self *EcdsaObject) CreateS256ECDSA() error
func (*EcdsaObject) Decrypt ¶ added in v1.1.0
func (self *EcdsaObject) Decrypt(msg string, aad []byte) ([]byte, error)
func (*EcdsaObject) Encrypt ¶ added in v1.1.0
func (self *EcdsaObject) Encrypt(msg, aad []byte) (string, error)
func (*EcdsaObject) GetPrivateKey ¶ added in v1.1.0
func (self *EcdsaObject) GetPrivateKey() (interface{}, string)
func (*EcdsaObject) GetPublicKey ¶ added in v1.1.0
func (self *EcdsaObject) GetPublicKey() (interface{}, string)
func (*EcdsaObject) LoadS256ECDSA ¶ added in v1.1.0
func (self *EcdsaObject) LoadS256ECDSA(b64 string) error
func (*EcdsaObject) Sign ¶ added in v1.1.0
func (self *EcdsaObject) Sign(msg []byte) ([]byte, error)
func (*EcdsaObject) Verify ¶ added in v1.1.0
func (self *EcdsaObject) Verify(msg, sign []byte) error
type RsaObj ¶
type RsaObj struct {
// 16字节string字段组
PrivateKeyBase64 string
PublicKeyBase64 string
// contains filtered or unexported fields
}
func (*RsaObj) CreateRsa1024 ¶
func (*RsaObj) CreateRsa2048 ¶
func (*RsaObj) CreateRsaFile ¶
func (*RsaObj) CreateRsaFileBase64 ¶
func (*RsaObj) CreateRsaPemFile ¶
func (*RsaObj) GetPrivateKey ¶
func (*RsaObj) GetPublicKey ¶
func (*RsaObj) LoadRsaFile ¶
func (*RsaObj) LoadRsaKeyFileBase64 ¶
func (*RsaObj) LoadRsaPemFile ¶
func (*RsaObj) LoadRsaPemFileBase64 ¶
Click to show internal directories.
Click to hide internal directories.