5 |
// Login <castor@epita.fr> |
// Login <castor@epita.fr> |
6 |
// |
// |
7 |
// Started on Wed Aug 27 18:53:21 2003 C@stor |
// Started on Wed Aug 27 18:53:21 2003 C@stor |
8 |
// Last update Wed Sep 10 00:25:54 2003 C@stor |
// Last update Thu Sep 11 15:28:53 2003 C@stor |
9 |
// |
// |
10 |
|
|
11 |
#include <iostream> |
#include <iostream> |
23 |
|
|
24 |
static int check_name(std::string name) |
static int check_name(std::string name) |
25 |
{ |
{ |
26 |
|
int check = 0; |
27 |
|
|
28 |
if ((name.size() < 4) | (name.size() > 8)) |
if ((name.size() < 4) | (name.size() > 8)) |
29 |
return 1; |
return 1; |
30 |
return 0; |
for (unsigned int i = 0; i <= (name.size() - 1); i++) |
31 |
|
{ |
32 |
|
if (isalnum(name.c_str()[i]) == 0) |
33 |
|
check = check | 1; |
34 |
|
} |
35 |
|
return check; |
36 |
} |
} |
37 |
|
|
38 |
static int check_passphrase(std::string passphrase) |
static int check_passphrase(std::string passphrase) |