Is it possible to encrypt certain string and it output 10 character?.
any idea?
Printable View
Is it possible to encrypt certain string and it output 10 character?.
any idea?
The length of the encrypted data would depend on the length of the original data. Hashing can and does output specific length regardless of the input, but hashing is one-way, so you cannot get the original data back again.
This might be helpful for ya:
http://support.microsoft.com/kb/301053
Hello,
Since hashing is one way..i rather go for two way...how can i encrypt my 10 character string..and it output also 10 character string.?...i think this is possible as jm said at post #2..the length of the encrypted data depend on length of the original data..
any can show me sample on how to do this..?..
I didn't mean that the output would be the same length as the input. Maybe it will and maybe it won't, but varying the input length will definitely vary the output length. Can you maybe give us the full story here, like how you actually intend to use this data?
sorry jm im misunderstand you.
actually,our server will initiate the string encryption and the encrypted string will be send to our client through text message and that encrypted string will be inputted to their client system.and it agreed that 10 character string will be good enough..so that client will not type very long string.
by this requirements,i would like to make an encryption algorithm that will take 10 character string and output also exactly 10 character string.
code to encrypt: 0531000002
053 - client code
100000 - is the amount
2 - count
the encrypted string will be decrypted in the client system and extract the decrypted code to read the client code ,amount and count..
BTW,mysql server will do the encryption through script.and decrypted by the client system using vb.net
hope this is possible.
thank you.