internal void DecryptAccessIDAndSecretKey() { DecryptedAccessID = SimpleAES4String.Decrypt(AccessID, KEK); DecryptedSecretKey = SimpleAES4String.Decrypt(SecretKey, KEK); KEK = KEK.HideString(1, true); // Config 조회 시 가리는 효과. }
public static Answers LoadAnswerByTwoQuestions(Questions q1, Questions q2) { using (IDbConnection cnn = new MySqlConnection(loadConnectionString())) { KEK kek = new KEK(q1.Id, q2.Id, q2.Id, q1.Id); var output = cnn.Query <Answers>("select * from answers " + "where (question1_id = @Id1 and question2_id = @Id2) OR (question1_id = @Id3 and question2_Id = @id4)", kek); return(output.ToList().FirstOrDefault()); } }