Documentation
¶
Index ¶
- Constants
- type AesLib
- type Cipher
- type HttpLib
- func (lib *HttpLib) GetHeaders() map[string]string
- func (lib *HttpLib) RequestGet(urlAddress string) (*http.Response, error)
- func (lib *HttpLib) RequestPost(urlAddress string, param map[string]string) (*http.Response, error)
- func (lib *HttpLib) RequestRaw(method string, urlAddress string, httpRawBody []byte) (*http.Response, error)
- func (lib *HttpLib) SetHeaders(headers map[string]string)
- func (lib *HttpLib) SetTimeout(timeout time.Duration)
- type RsaLib
- func (lib *RsaLib) Decrypt(ciphertext []byte) ([]byte, error)
- func (lib *RsaLib) Encrypt(plaintext []byte) ([]byte, error)
- func (lib *RsaLib) GeneratePrivateKey(bits int) (*rsa.PrivateKey, error)
- func (lib *RsaLib) GetPrivateKey() *rsa.PrivateKey
- func (lib *RsaLib) GetPublicKey() *rsa.PublicKey
- func (lib *RsaLib) SetPadding(padding int)
- func (lib *RsaLib) SetPrivateKey(privateKey []byte) error
- func (lib *RsaLib) SetPublicKey(publicKey []byte) error
- func (lib *RsaLib) SignVerifySha1(data []byte, sign []byte) bool
- func (lib *RsaLib) SignVerifySha256(data []byte, sign []byte) bool
- func (lib *RsaLib) SignWithSha1(data []byte) ([]byte, error)
- func (lib *RsaLib) SignWithSha256(data []byte) ([]byte, error)
Constants ¶
View Source
const ( OPENSSL_PKCS1_PADDING int = 1 OPENSSL_PKCS1_OAEP_PADDING int = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpLib ¶
type HttpLib struct {
// contains filtered or unexported fields
}
func NewHttpLib ¶
func NewHttpLib() *HttpLib
func (*HttpLib) GetHeaders ¶
func (*HttpLib) RequestGet ¶
func (*HttpLib) RequestPost ¶
func (*HttpLib) RequestRaw ¶
func (*HttpLib) SetHeaders ¶
func (*HttpLib) SetTimeout ¶
type RsaLib ¶
type RsaLib struct {
// contains filtered or unexported fields
}
func (*RsaLib) GeneratePrivateKey ¶
func (lib *RsaLib) GeneratePrivateKey(bits int) (*rsa.PrivateKey, error)
func (*RsaLib) GetPrivateKey ¶
func (lib *RsaLib) GetPrivateKey() *rsa.PrivateKey
func (*RsaLib) GetPublicKey ¶
func (*RsaLib) SetPadding ¶
func (*RsaLib) SetPrivateKey ¶
func (*RsaLib) SetPublicKey ¶
func (*RsaLib) SignVerifySha256 ¶
Click to show internal directories.
Click to hide internal directories.