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 static byte[] SignData(RSAKey key, byte[] dataToSign) { return(key.Key.SignData(dataToSign, new SHA1CryptoServiceProvider())); }
public void Sign(RSAKey privateKey) { this.LicenseHash = this.ByteArrayToHex(RSAFunctions.SignData(privateKey, this.StringToBytes(this.ToStringInternal()))); }
public static bool VerifyData(RSAKey key, byte[] hash, byte[] dataSigned) { return(key.Key.VerifyData(dataSigned, new SHA1CryptoServiceProvider(), hash)); }