提交 v1.3.0-beta2
This commit is contained in:
@ -7,6 +7,8 @@ import (
|
||||
"crypto/sha512"
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
|
||||
"github.com/denisbrodbeck/machineid"
|
||||
)
|
||||
|
||||
// SignatureRSA rsa私钥签名
|
||||
@ -46,3 +48,7 @@ func VerifyRSA(plainText, signText []byte, rsaPublicKey string) bool {
|
||||
err = rsa.VerifyPKCS1v15(publicKey, crypto.SHA512, hashText[:], signText)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func GetMachineId() (string, error) {
|
||||
return machineid.ID()
|
||||
}
|
||||
|
Reference in New Issue
Block a user