🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

simple encryption or just useless

Started by
30 comments, last by Sinner_Zero 22 years, 8 months ago
quote: Original post by Maximus
Quantum computers already exist. A demonstration of their power was one being used to crack 512bit encryption, which it did... in approximately 0.12 seconds IIRC

you''re kidding, right? i thought those were science fiction...
dude, who has one, and do they have a web site? i want to read about it...

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Advertisement
dangit, c''mon, real question here, is my idea like, decent or like usual or what? I mean should I just mix XOR MOD and the little bit thing, using my own bit class ofcourse as I don''t know any that are standard for C++.
please..........just someone say yes and I''ll be happy, hell even if you don''t know what the hell I''m talking about. Just say yes and I''ll go on with my life here, please.

Oh, and thanks for all the help uptill now also, ofcourse.
quote: Original post by Sinner_Zero
please..........just someone say yes and I''ll be happy, hell even if you don''t know what the hell I''m talking about. Just say yes and I''ll go on with my life here, please.

YES!


--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
thank you! Now I can get on with my crappy coding life, 80 more pages and it''s on to me MFC book =)

so as of like tomorrow I''m gonna start my search for everything on C++ that I missed and finally starting some DX7 (DDraw) stuff to learn the basics of game making with that RPG making tut that was here.
quote: Original post by Sinner_Zero
Well I''m more confused than a drunken munkey.

now, this ''^'' thinger, I understand it sorta, see now, it compares bits, if theyre equal it returns 1 and if theyre no it returns 0.

You got it a little backwards. The ''^'' operator is called XOR (eXclusive OR). It set''s each bit in the result where the corresponding bits in the operands are different. i.e.
For each bit in A and B the following truth table gives the result:  A | B | A xor B ---+---+---------  0   0      0  0   1      1  1   0      1  1   1      0e.g.      A = 1001101      B = 0011011A xor B = 1010110

quote:
how can I get access to the binary''s? I mean I assume I can make my own little thinger that like puts the binary code into like a string and manipulate it from there but is there anything that already does this for you? maybe I should start looking into assembly?

quote:
Ok, I was just looking into some assembly and saw that (quite simple) they had the regular binary <--> decimal switching code. So assuming C++ can''t regularly do this I can make (this is a sensible way of encryption?) my own int to binary then back to int encryption/decryption no?

Umm, I''m not quite sure what you mean here. Everything in a computer is stored in binary code. You don''t have to convert anything. Or do you mean convert int''s etc to a base-two string representation? That would be good for printing numbers in binary form, but would only complicate the encryption stuff you seem to want to do.
well I saw a doc before that said to change the numbers to binary then put all the binaries into one line and divide them into like 4''s instead of 8''s and change them back to ints or chars or whatever.

I mean how can I do that without making like a binary string? or base2 as you say which I can only see possible by storing into strings.

Basically if someone can link me to some bitwise info I bet there is an easy way.
Oh, and thanks a ton for the XOR correction.
Eh? bitwise tuts anyone?

I just posted this to test my cookies, I don''t mean to not be looking on my own. But if you have the resources already please do share.
quote: Original post by Sinner_Zero
well I saw a doc before that said to change the numbers to binary then put all the binaries into one line and divide them into like 4''s instead of 8''s and change them back to ints or chars or whatever.

I mean how can I do that without making like a binary string? or base2 as you say which I can only see possible by storing into strings.

You could do that with bitshifts and bitwise ands etc. If you haven''t already you should get yourself a good introductory book on programming in C++ (or C if you prefer). (Sorry, but I can''t recommend any book in particular.)

This topic is closed to new replies.

Advertisement