Decryption of reports
1 min
For PII (personal identity information) compliance purpose, the JSON report will be encrypted and could be decrypted through the public key previously provided.
GoLang example:
import (
"fmt"
"github.com/wenzhenxi/gorsa"
)
var PublicKey = `-----BEGIN PUBLIC KEY-----
xxxxxxx
-----END PUBLIC KEY-----`
var PrivateKey = `-----BEGIN RSA PRIVATE KEY-----
yyyyyyy
-----END RSA PRIVATE KEY-----`
func main() {
data := "hello world"
priEncrypt, _ := gorsa.PriKeyEncrypt(data,PrivateKey)
pubDecrypt, _ := gorsa.PublicDecrypt(priEncrypt,PublicKey)
fmt.Println(pubDecrypt)
}