.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Decryption logic

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net

want to find a way to decrypt a password in the database. I have an encrption key and the algorithm used for encryption was Rijndael/AES (32 bit). 

View Complete Post

More Related Resource Links

Logic behind N -Tier Application Development

In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

Pattern for huge logic



I am looking for a pattern/way to code for implement Huge logical hierarchy, Basically this is to verify person details like qualification, experience, expertised-in and global region.... and issue certain access for a perion of time.

The verification process has huge number of conditions it took around 1 year to document. And now we have to develop C# to implement it, can any one help me...? a sample code will be appreciated.

Thank you


Logic to calculate business hours


Hi All,

I have tried searching all over the web for this logic. Got many but half of them did not match what i was looking for and half were malfunctioning.

I want to calculate business working hours between 2 datetime, where in I should be able to set the working hours as well as weekends and holidays should not be calculated.


Please help me guys... It will be a great help... 

Executing Command Logic in a View Model

Through the use of the Windows Presentation Foundation's (WPF) advanced data-binding capabilities, the logical structure of a user interface can relatively easily be disconnected from its presentation. Bindable components can now contain nearly all of an application's user interface logic and in most circumstances, replace the need for controller objects from the classic Model-View-Controller (MVC) pattern. So it's no wonder that a new pattern for UI design has appeared

Encryption/Decryption OAEP

I have some code: string newKey = AmazonFeedBrowser.Security.CryptoKeyContainer.GetKeyFromContainer("KeyContainer", true); RSACryptoServiceProvider trsa = new RSACryptoServiceProvider(); trsa.FromXmlString(newKey); string tu = Convert.ToBase64String(trsa.Encrypt(Encoding.UTF8.GetBytes("Administrator"), true)); Debug.WriteLine(tu); newKey = AmazonFeedBrowser.Security.CryptoKeyContainer.GetKeyFromContainer("KeyContainer", false); trsa = new RSACryptoServiceProvider(); trsa.FromXmlString(newKey); Debug.WriteLine(Encoding.UTF8.GetString(trsa.Decrypt(Convert.FromBase64String(tu), true))); I get a cryptographic exception indicating that the OAEP padding cannot be processed. The RSACryptoServiceProvider (trsa) is initialized with just the public key. It seems to work OK with the public and private key. Is there a way to use OAEP with just the public key? Error occurred while decoding OAEP padding. System.Security.Cryptography.CryptographicException was unhandled Message=Error occurred while decoding OAEP padding. Source=mscorlib StackTrace: at System.Security.Cryptography.RSACryptoServiceProvider.DecryptKey(SafeKeyHandle pKeyContext, Byte[] pbEncryptedKey, Int32 cbEncryptedKey, Boolean fOAEP, ObjectHandleOnStack ohRetDecryptedKey) at System.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[] rgb, Boolean fOAEP) .

count by casetypes with some logic

I have this query which displays all the SpecimenTypeNames for all our cases for a ComponentID. SELECT APVX.DOS.SpecimenType.SpecimenTypeName      FROM         APVX.ORDERS.ComponentOrder INNER JOIN                       APVX.ORDERS.ApCase INNER JOIN                       APVX.ORDERS.TestOrder ON APVX.ORDERS.ApCase.CaseID = APVX.ORDERS.TestOrder.CaseID INNER JOIN                       APVX.ORDERS.TestOrderSpecimen ON APVX.ORDERS.TestOrder.TestOrderID = APVX.ORDERS.TestOrderSpecimen.TestOrderID INNER JOIN                       APVX.ORDERS.Specimen ON APVX.ORDERS.TestOrderSpecimen.SpecimenID = APVX.ORDERS.Specimen.SpecimenID ON                       APVX.ORDERS.ComponentOrder.TestOrderID = APVX.ORDERS.TestOrder.TestOrderID INNER JOIN            &

Encryptipn Decryption from a Java generated key

I have a Triple DES Key generated by java code from a third party vendor. It is a 3 part key. We need to use this key in our VB.NET application.  When I try to combine this key and use it in my app 'Dim desTransform As ICryptoTransform = desCrypto.CreateEncryptor(EncryptKey(Key), EncryptIV(IV))' gives me an error ' Specified key is not a valid size for this algorithm) I am new to cryptography and do not understand the algorithms well. How can I use the java generated key in our app for encrypt/decrypt.   Any help will be appreciated.  

General Controller to View logic question

Hello, I am currently learning the MVC2 Framework and I have a brief question in terms of my logic and if their are any flaws in it. I created a basic example in a couple of minutes that demonstrates the way I think about it. public ViewResult Index() { return View(); } public ViewResult Cookies() { return View(new Cookie()); } public ViewResult CookiesInput(Cookie cookie) { return View(cookie); }<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>I really like cookies</h2> Would you like a cookie? <% using (Html.BeginForm("Cookies", "Example")) { %> <p><input type="submit" value="Yes" /></p> <% } %> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>Cookies</h2> <% using (Html.BeginForm("CookiesInput", "Example")) { %> <%= Html.EditorForModel() %> <p><input type="submit" value="Gimme" /></p> <% } %> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainConten

Strongest Encyption and Decryption

Good morning to all,      Just want to ask, what is the strongest encryption and decrption that i can use using c#..? Using your suggested encryption and decryption.. Can i use this to encypt and decrypt some part of the  script..? for example i have a account number 1234567890.. when displaying this account number it should be "123456xjoh" is this possible..?     Hope to hear from you soon.. Thanks, Link 

3-State Logic -- mostly for academic fun

Before I start, please understand that I am not criticizing nor asking for any kind of change.  Rather, my purpose is more-or-less idle academic curiosity.  My departure point has to do with this kind of syntax: WHERE x NOT IN (SELECT y FROM anyTable) Specifically, the circumstances in which y is a nullable column. Many of you already know that this kind of WHERE clause should be avoided because of 3-state logic.  3-state logic cause this kind of WHERE clause to exclude all rows whenever there are ANY null values in the y column.  The logic is to interpret a NULL as a state in which the value of y is "unknown".  The logic continues in that since Y is unknown it becomes therefore impossible to decide whether or not X is truely not in the Y column. Fair enoug.  Now, by academic logic and not based on how SQL works if we apply the "NULL represents an UKNOWN value" hypothesis and for the sake of consistency, should the MAX and MIN functions given in this circumstance also be NULL? declare @test table (x tinyint) insert into @test select null union all select 3 union all select 250 --select * from @test select min(x) [Min], max(x) [Max] from @test /* -------- Output: -------- Min Max ---- ---- 3 250 Warning: Null value is eliminated by an aggregate or other SET operation. (1 row(s) affected) */ I am not saying that th

Scoring logic for fuzzy search

Hi,I'm writing a stored proc that's performing search results based on fuzzy logic & now have a list of results which I need to score so the more relevant results appear at the top.I took a break from this project & upon returning I just seem to be confusing myself so was hoping that someone clever would be on here that could help.So here's what I have:The following are results for a search on 'San Andres'. (This may look a bit messy)ItemID WordInTitleMatch ScorePercent ----------- ---------------- ------------ 10 0 100 19 0 50 70 0 100 72 0 100 73 0 100 74 0 100 75 0 50 76 0 50 77 0 100 80 1 100 WordID Word ExactMatch MetaPhoneMatch SoundexMatch WordInWordMatch WordInWordReverseMatch WordInTitleMatch LengthMatch FirstLettersMatch ItemWordID ItemID Postition WordIndex ----------- ----------------------------------------------------------------------

Linq Ouery / Code / Logic for Finding Best Selling Products

Hello ExpertsPlease do reply as i am a beginner ..This is a table Named Products .. I want to show Best Selling products in a Datalist .. kindly tell me the logic for doing so by providing some examples or code by using LINQ ... Kindly help me .. [ProductId] [int] IDENTITY(1,1) NOT NULL,    [Name] [nvarchar](400) NOT NULL,    [ShortDescription] [nvarchar](max) NOT NULL,    [FullDescription] [nvarchar](max) NOT NULL,    [AdminComment] [nvarchar](max) NOT NULL,    [ProductTypeID] [int] NOT NULL CONSTRAINT [DF_Nop_Product_ProductTypeID]  DEFAULT ((1)),    [TemplateID] [int] NOT NULL,    [ShowOnHomePage] [bit] NOT NULL,    [MetaKeywords] [nvarchar](400) NOT NULL,    [MetaDescription] [nvarchar](4000) NOT NULL,    [MetaTitle] [nvarchar](400) NOT NULL,    [SEName] [nvarchar](100) NOT NULL,    [AllowCustomerReviews] [bit] NOT NULL,    [AllowCustomerRatings] [bit] NOT NULL CONSTRAINT [DF_Nop_Product_AllowCustomerRatings]  DEFAULT ((1)),    [RatingSum] [int] NOT NULL,    [TotalRatingVotes] [int] NOT NULL,    [Published] [bit] NOT NULL,    [Deleted] [bit] NOT NULL,    [CreatedOn] [datetime] NOT NULL,  

Logic for Summary and Specifications .. how to use datalist for showing product listing ?

Hello Experts .. I am working on a shopping website , i want to create a page where only one item from a category is selected ..... and simunatneously summary and specification will be changed .. http://store.apple.com/us/configure/MC374LL/A?mco=MTc0Njg1ODA   ---------- only one item to be selected at a time ...Kindly tell me the logic of doing this ... Amit

Applying logic to Validator controls

Here's an interesting one!I have a RadioButtonList control, containing two ListItems. These two Radio Buttons toggle each other, so that only one is selected at a time. When the second is selected, it affects whether a Textbox is enabled or not, and also erases the text in the Textbox when selected. Lastly, a Button is present to execute the selections made.I have a RequiredFieldValidator and a RegularExpressionValidator on the Textbox, since when the first Radio Button is selected, I need to validate the entry. However, I need to turn off the functionality of the Validator controls when the second Radio Button is selected.Any ideas? I'm coding in VB.NET. Thanks in advance!

MDX query performance is slow for complex logic implementation in Calculated Members.

We have implemented a calculated members which involves multiple calculated members  called in a nested e.q. Cal1 calls Cal2 and Cal2 calls  Cal3  and Cal3 calls Cal4 .  And when browing Cal1 through Excel it takes around 30 mins for getting result from a Partition having row count around 5 million. Follwing are the information on the scenario I am having: We are having partitioning in the cube. one partition contains around 4-6 million records Processers on Query Server: 4 quad core RAM on the Query Server: 64 GB Calculated members having simple calculation logics are giving results in no time. There is a Calculated members which calls 6 intermediate calculated in nested way and with small Data Set like 5-6 k rows it is running fine.   Any help will be much appreciated.   Regards, Sandeep

Branching logic with lists?

Here's my situation: I have a flowchart that I want the customer to follow. Question A - Answer Yes or No. If they answer Yes, they go to one link. If they answer No, they go to Question B. etc. Branching logic in a 'survey' does not help because I can't link the response to a document. How do I do this? Thank you, Lisa Chapman

Best way to implement business logic

I am trying to migrate our current SQL CRM to Sharepoint Server 2010. At first I tried using BCS but I couldn't figure out how to implement a many-to-many lookup relationship. So now I am trying to use SSIS to move the SQL data into the lists in Sharepoint. Right now, I have accounts and contacts as lists. Now I am trying to implement the business logic where an account can have multiple contacts and a contact can have multiple accounts and when a user associates a contact with an account (or vice versa), that account should automatically be associated back with the contact. It seems this cannot be accomplished with a declarative work flow like in SPD. Am I correct in thinking that the best way to implement this is with 2 sequential workflows in Visual Studio?  Also, is a workflow always preferrable to an event receiver? Thanks!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend