Click here to Skip to main content
15,912,897 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi friends,
I have a winform that contains three textboxes:
code1 : [ ... ]
code2 : [ ... ]
code3 : [ ... ]

Users have the code1 and code2, i want to generate a code ( code3 ) by using both code1 and code2.
what algorithm should i use ? it should be powerful and it shouldn't be easy to hack !
what issue should i search in the web !?
is it related to hashing !? if so how could i learn it?

excuse my bad english.
thanks in advance.
Posted
Comments
dan!sh 9-Jul-12 4:46am    
How exactly do you want to merge the two existing codebase?
Mohamad77 9-Jul-12 9:08am    
i don't have any idea about this, for instance two 12 character codes, result one 12 character code as code3.
the user shouldn't identify how it happens, and he shouldn't be able to guess how the third code created !
bbirajdar 9-Jul-12 6:39am    
Hire a developer from www.freelancer.com

1 solution

Simple: XOR both codes.

Drawbacks:
- Whoever knows two of the codes can esily process the third.
- Codes must equal in length. Or you have to extend the shorter one.


What requirements does the combination need to fit? Improve your question on this using the Improve question[^] link.
 
Share this answer
 
Comments
Mohamad77 9-Jul-12 9:12am    
thanks lukeer,
but don't you think that the user simply identify the XOR algorithm, and hack it easily !?
i need a powerful algorithm. is it possible?
lukeer 11-Jul-12 2:58am    
I'm sure there is a more secure algorithm. But you have to define What security means in this case.

Who will see what code? Who is allowed to change what code? Do codes need to be equal in lenght? Such stuff.
Please Improve your question using the "Improve question" link.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900