# Qbasicnews.com

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:

Code:
```DECLARE FUNCTION decript\$ (a\$) DECLARE FUNCTION encript\$ (a\$) a\$ = "HELLO WORLD" PRINT a\$ b\$ = encript\$(a\$) PRINT b\$ c\$ = decript\$(b\$) PRINT c\$ 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%)    WEND    decript\$ = res\$ END FUNCTION 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%))       ELSE          out\$ = out\$ + ">" + LTRIM\$(STR\$(m% - a%))       END IF       a% = m%    NEXT i%    encript\$ = out\$ END FUNCTION```

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

Code:
`35520781707917087370403237390843093082270089242032262084180723599073160833251033`

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.
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

Now give this a go:

Code:
`35520781707917087370403237390843093082270089242032262084180723599073160833251033`

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

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 I guess it is harder to decypher my decyphering funcion than decyphering the cyphered code itself
Pages: 1 2