I need to encrypt a string into a int value. For example
orig : JED888FLETCHER
Encrypted : 145123456259985
or some such. thanks in advance.
Encrypt, encode or hash?
A hash is one way, so you cannot "decrypt" it.
Encoding can be as simple as changing symbols. To do this, make two
arrays of symbols in different orders, then find the symbol in one and
change to the symbol at the same location in the other. There are other
ways, of course, but that is simple down and dirty (NOTE that BASE 10
does not have enough symbols to handle 26 letters and 10 numbers).
Encryption generally will use Unicode (when a string) or HEX (when
binary), so it is not just numbers, but it is the safest if you need to
keep secrets, as it actually alters the data through an algorithm and
makes it very hard to reverse engineer, if not "impossible".
peace and grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************