public bool Validate() { using (RSAKey rSAKey = new RSAKey(this.RSAPublicKey)) { this.validated = RSAFunctions.VerifyData(rSAKey, this.HexStringToByteArray(this.LicenseHash), this.StringToBytes(this.ToStringInternal())); } return(this.IsValid); }
public void Sign(RSAKey privateKey) { this.LicenseHash = this.ByteArrayToHex(RSAFunctions.SignData(privateKey, this.StringToBytes(this.ToStringInternal()))); }