-=> Quoting Sander Smeenk to All <=-
SS> The result would be:
SS> 83 97 110 100 101 114 32 83 109 101 101 110 107
SS> S a n d e r S m e e n k
SS> A good programmer surely knows how to hack this type of "code"
SS> I'd like some code like:
SS> C8GH0L0E84033
SS> Wich isn't easy to crack.. But how?
SS> I need to crypt a name and decrypt a crypted name.. HELP WANTED!!!
There is no straightforward answer to your question. There are a
vast number of encryption methods to choose from ranging from
the very simple to the fiendishly complex. The choice you make
depends on how much trouble you want to go to, how much
"hacking" you hope to withstand, and how important it is to
withstand it. A very simple solution which is only suitable to
protect stuff from casual inspection might be to simply add some
offset value to each character thus shifting it in the alphabet.
If you were to add "1" (or some other small integer) for example
then:
"Sander Smeenk"
becomes
"Tboefs!Tnffol"
Your code could be easily modified to do this as:
N$ = "Sander Smeenk"
OFFSET% = 1
FOR X = 1 TO LEN(N$)
A$ = A$ + LTRIM$(RTRIM$(STR$(OFFSET%+ASC(MID$(N$, X, 1)))))
^^^^^^^^
NEXT X
This would protect against someone using a "list" program to
inspect data files for example but is pretty well instantly
crackable with little analysis. This sort of simple scheme can
be elaborated upon doing things like shuffling the letters,
choosing an offset according to some pattern you know so all
entities are not done the same, etc. etc.
On the other end of the scale are things like "public key
encryption" algorithms like PGP (Pretty Good Privacy) which are
extremely difficult to crack and requre significant computer
resources be brought to bear on the problem to achieve a
"crack".
-- Regards --
Sid Lee (FIDO - 1:134/122, Internet - sidlee@cadvision.com)
-- Regards --
Sid Lee (FIDO - 1:134/122, Internet - sidlee@cadvision.com)
`
--- Blue Wave/Max v2.12
---------------
* Origin: RASCAL BBS [Calgary, Alberta - (403)686-2550] (1:134/122)
|