Re: [RESOLVED] Encryption
Re: [RESOLVED] Encryption
Ah i missed that. I've only seen his 128, 160 and 256 Bit File Encryption/Decryption with MD5, SHA1. Looks kinda similar to what I've tried but it works :p. Thanks, i'll come in handy later.
Re: [RESOLVED] Encryption
I just saw your thread...
If you want to make a one way encryption, why not just use MD5 (or SHA1 or SHA256) Hash ? I have the classes in the High Encryption program you said you looked at it.
Also, back to your algorithm, if you want it one way, you will make it much more difficult to break if you have the result constant, instead of preserving the original length.
Also, it may or may not be decryptable because when you fill the array with random numbers, the random numbers could repeat. For example you could have "A" replaced with random number 10, and "B" with random number 10 again... therefore you won't be able to tell the original if it was replaced with the same number.
But then again, if most replacements are with the same random number, then you could have 2 strings, having the same encryption result.
That's exactly what hashing tries to accomplish (like MD5, SHA1, etc.), the chance that 2 strings have the same result is extremly minimal, in fact, that's where the hashing bits come into place.
For example, for MD5 the chance that 2 strings have the same result is 2^128 = 3.4028236692093846346337460743177e+38 (since MD5 is 128 bit)