Users browsing this thread: 1 Guest(s)
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Would like to join team
08-04-2009, 06:34 AM,
#11
RE: Would like to join team
(08-04-2009, 05:50 AM)rajkosto Wrote: why are you using scanf if you are already using cout ?

Scanf was for grabbing user input. I only use cout for printing text to the CLI.

Like printf.
Reply
08-04-2009, 06:42 AM,
#12
RE: Would like to join team
How did you randomly learn C and C++ in such a short time?
Reply
08-04-2009, 07:16 AM,
#13
RE: Would like to join team
I read a book. Or two. Or three.

It doesn't matter. Reading is good for you, kids.
Reply
08-04-2009, 07:21 AM,
#14
RE: Would like to join team
the c++ way of getting input from stdin is cin >> var;
thats why i was asking, scanf is the c way
also, it wouldnt work anyway, you didnt put Yes and No like "Yes" and "No"
also scanf requires a C string as its output, and a std:Confusedtring isnt writable unless using streams
Reply
08-04-2009, 07:41 AM,
#15
RE: Would like to join team
It doesn't help that I read a C book, based on my knowledge on that. Then moved on to C++ immediately after. I mix and match the code, and my compiler doesn't seem to care.
Reply
08-04-2009, 07:58 AM,
#16
RE: Would like to join team
your compiler is messed up
anyway, do me something in php with a database, dont bother with c++

database table: users
username,passwordSalt,passwordHash varchar
userIdent1,userIdent2 int
publicExponent int
publicModulus blob 96 bytes
privateExponent blob 96 bytes

password hash = sha1(sha1(passwordSalt) + sha1(inputPassword))

make me a php page that allows making user accounts

username = as entered in http form
passwordSalt = random string of letters
passwordHash generated as above using http form as password input
userIdent1 = unique sequential uint not bigger than 16777215
userIdent2 = unique sequential uint not bigger than 4294967295

using Crypto_RSA generate a RSA public/private key pair of 768 bits with publicExponent = 17 (i do not know if mxo will support any other kind of public exponent, but everything it does with RSA keys it uses public exponent 17)
so publicExponent in the database will always be 17
then store the publicModulus and privateExponent in the table (should be 96 byte binary data when generated)
Reply
08-04-2009, 02:08 PM, (This post was last modified: 08-04-2009, 03:55 PM by Neo.)
#17
RE: Would like to join team
You need something in PHP for Web? i am your man for this Smile
The old mxoemu page was done fast and short cause we had need a site, so i didnt spent much time and work in this (and so it wasnt good developed).

I have standard classes in php for mysql, user authentication that i used for my pages so its no big problem, to modify them (cause they dont used salted passwords).

Found RSA Class for PHP, will check this within the next days.

http://www.torsten-keil.net/privates/dl_...download=5
Reply
08-04-2009, 10:36 PM,
#18
RE: Would like to join team
My PHP sucks. And no, it's usually fine to mix C and C++.

It's worth noting that C++ adds a lot of crap to its input, so I always use C for collecting user input.
Reply
08-04-2009, 10:47 PM,
#19
RE: Would like to join team
that made no sense anyway, and if you suck at php then Y SO SRS
Reply
08-05-2009, 03:58 AM,
#20
RE: Would like to join team
Raj even though i know nothing about coding, youve practically made the PHPpage in that post up there LOL!
Reply


Forum Jump: