Documentation ¶
Index ¶
- Constants
- func Base64decode(str string) ([]byte, error)
- func Base64encode(src []byte) string
- func CancelTargetStr(str, substr string) string
- func CreatCancelLineUuid() string
- func CreatUuidv4() string
- func CreateKeys(publicKeyWriter, privateKeyWriter io.Writer, keyLength int) error
- func GenRSAKey(size int) (privateKeyBytes, publicKeyBytes []byte, err error)
- func GetCpuNum() (int, error)
- func GetCpuPercent() float64
- func GetDiskPercent() float64
- func GetDistrictUnixNanoTime(t time.Time) int64
- func GetDistrictUnixTime(t time.Time) int64
- func GetFileMd5(path string) (string, error)
- func GetFirstMacAddr() (string, error)
- func GetFreeMemory() uint64
- func GetLastProofQueueData() interface{}
- func GetNowUnixNanoTime() int64
- func HttpRequest(url, ContentType string, method HttpMethod, v io.Reader, ...) ([]byte, error)
- func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
- func RsaDecrypt(src, privateKeyBytes []byte) (bytesDecrypt []byte, err error)
- func RsaDecryptBlock(src, privateKeyBytes []byte) (bytesDecrypt []byte, err error)
- func RsaEncrypt(src, publicKeyByte []byte) (bytes []byte, err error)
- func RsaEncryptBlock(src, publicKeyByte []byte) (bytesEncrypt []byte, err error)
- func TrunFloat(f float64, prec int) float64
- type HttpMethod
- type Queue
- type XRsa
Constants ¶
View Source
const ( CHAR_SET = "UTF-8" BASE_64_FORMAT = "UrlSafeNoPadding" RSA_ALGORITHM_KEY_TYPE = "PKCS8" RSA_ALGORITHM_SIGN = crypto.SHA256 )
Variables ¶
This section is empty.
Functions ¶
func Base64decode ¶
func Base64encode ¶
func CancelTargetStr ¶
func CreatCancelLineUuid ¶
func CreatCancelLineUuid() string
func CreatUuidv4 ¶
func CreatUuidv4() string
func CreateKeys ¶
生成密钥对
func GetCpuPercent ¶
func GetCpuPercent() float64
func GetDiskPercent ¶
func GetDiskPercent() float64
func GetDistrictUnixTime ¶
func GetFirstMacAddr ¶
func GetFreeMemory ¶
func GetFreeMemory() uint64
func GetLastProofQueueData ¶
func GetLastProofQueueData() interface{}
func GetNowUnixNanoTime ¶
func GetNowUnixNanoTime() int64
func HttpRequest ¶
func HttpRequest(url, ContentType string, method HttpMethod, v io.Reader, header map[string]string) ([]byte, error)
将数据发送出去 HttpRequest ...
func MarshalPKCS8PrivateKey ¶
func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
func RsaDecrypt ¶
* 私钥解密
func RsaDecryptBlock ¶
* 私钥解密-分段
func RsaEncryptBlock ¶
* 公钥加密-分段
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue 队列
var (
GlobalProofQueue *Queue
)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.