public string GetData(string key) { SqlCommand command = new SqlCommand("SELECT [Data] FROM QuickCopy.Users WHERE ID = @UserID", conn); command.Parameters.AddWithValue("@UserID", userID); object ret = command.ExecuteScalar(); return(ret.Equals(DBNull.Value) ? null : EncryptionHandler.Decrypt(key, (byte[])ret)); }
public string GetData(string key) { return(EncryptionHandler.Decrypt(key, File.ReadAllBytes(Path))); }