Jump to content
Tuts 4 You

NCRYPTX


JMC31337

Recommended Posts

Posted (edited)

...

Edited by JMC31337
Hyperlisk
Posted (edited)

I'm gonna be honest. That's some of the worst source I've seen in awhile...

autoKeyE/D() looks like a simple substitution cipher, which you could have made a lot easier with an array using the array key as the byte you want to replace and the value of array[key] as the new byte. Also known as an S-box.

Your Caesar shift doesn't look like one I've ever seen either. If it was right, you'd be able to specify the shift amount, then you could implement rot13 with caesar(ch, 13);

So yeah... You should learn good programming practices.

Edited by Hyperlisk
Posted

I'm gonna be honest. That's some of the worst source I've seen in awhile...

autoKeyE/D() looks like a simple substitution cipher, which you could have made a lot easier with an array using the array key as the byte you want to replace and the value of array[key] as the new byte. Also known as an S-box.

Your Caesar shift doesn't look like one I've ever seen either. If it was right, you'd be able to specify the shift amount, then you could implement rot13 with caesar(ch, 13);

So yeah... You should learn good programming practices.

yea... an array would def would have been the way to go.. i took the easy way out... i'll check out the s box link and i'll work on it...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...