Full Version: Decrypt this:
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This challenge isn't challenging no more. Here is my original proggie:

DECLARE FUNCTION decript$ (a$)
DECLARE FUNCTION encript$ (a$)
b$ = encript$(a$)
c$ = decript$(b$)

FUNCTION decript$ (a$)
   c% = VAL(a$): res$ = CHR$(c%)
   o$ = RIGHT$(a$, LEN(a$) - LEN(LTRIM$(STR$(VAL(a$)))))
   WHILE o$ <> ""
      m$ = LEFT$(o$, 1)
      o$ = RIGHT$(o$, LEN(o$) - 1)
      IF m$ = "<" THEN c% = c% - VAL(o$) ELSE IF m$ = ">" THEN c% = c% + VAL(o$)
      IF m$ <> "=" THEN o$ = RIGHT$(o$, LEN(o$) - LEN(LTRIM$(STR$(VAL(o$)))))
      res$ = res$ + CHR$(c%)
   decript$ = res$

FUNCTION encript$ (a$)
   a% = ASC(LEFT$(a$, 1)): out$ = LTRIM$(STR$(a%))
   FOR i% = 2 TO LEN(a$)
      m% = ASC(MID$(a$, i%, 1))
      IF m% = a% THEN
         out$ = out$ + "="
      ELSEIF m% < a% THEN
         out$ = out$ + "<" + LTRIM$(STR$(a% - m%))
         out$ = out$ + ">" + LTRIM$(STR$(m% - a%))
      END IF
      a% = m%
   NEXT i%
   encript$ = out$

I've invented another encryptation algo. The output was:


Now crack this one.
Hey? Dont i get *any* credit? I cracked your old algo, and i wrote a program to decypher it! And i had it mainly worked out before megs post.
Hey...you get credit, Dark. I couldn't have done that to save my life. :o
I'm good at encryption (hey, nobody's cracked it yet! :wink: ) And I suck at decryption. It's easy to be that way. Tongue
Of course, dark_prevail, you get credit. I just thought that you used the hint, and with the hint the challenge disappeared. Nice algo, btw. I was a little bit pissed off and I didn't even check it. My apologies Smile

Now give this a go:


This time it is a little bit harder until you find the pattern.
Thanks for the credit =D

Its ok, no apoligies needed, nathan. I would have been pissed off to, if someone had comprimised my challenge like that. =P

Quote:Nice algo, btw.
Hah! Its a pile of spagetti Tongue

I will have a look at your new, code, although it looks a lot harder. =P
I don't think it is spaghetti. What was challenging in my first encryption problem was not the decryption itself but coding a decent parser to do the work, and you just did a simple and fast snippet. Look at mine's, it is just unreadable code Tongue I guess it is harder to decypher my decyphering funcion than decyphering the cyphered code itself Big Grin
Pages: 1 2