/// <summary>Version 1</summary> /// <param name="hashedPassword">hashedPassword</param> /// <param name="providedPassword">providedPassword</param> /// <returns>検証結果</returns> private PasswordVerificationResult V1VerifyHashAlgorithm( string hashedPassword, string providedPassword) { if (GetKeyedHash.EqualSaltedPassword( providedPassword, hashedPassword.Substring(4), EnumKeyedHashAlgorithm.MACTripleDES)) { return(PasswordVerificationResult.Success); } else { return(PasswordVerificationResult.Failed); } }
private void btnSPWDAuth2_Click(object sender, EventArgs e) { // パラメタ系は渡さないで検証可能 if (GetKeyedHash.EqualSaltedPassword( this.txtSPWDRawPassword2.Text, this.txtSPWDSaltedPassword2.Text, (EnumKeyedHashAlgorithm)this.cbxSPWDPV2.SelectedValue)) { MessageBox.Show("認証成功"); } else { MessageBox.Show("認証失敗"); } }