Lines Matching refs:u_char

153 static void	ascii2unicode (const char[], int, u_char[]);
154 static void NTPasswordHash (u_char *, int, u_char[MD4_SIGNATURE_SIZE]);
155 static void ChallengeResponse (const u_char *, const u_char *, u_char[24]);
156 static void ChallengeHash (const u_char[16], const u_char *, const char *, u_char[8]);
157 static void ChapMS_NT (const u_char *, const char *, int, u_char[24]);
158 static void ChapMS2_NT (const u_char *, const u_char[16], const char *, const char *, int,
159 u_char[24]);
161 (const char*, int, u_char[24], const u_char[16], const u_char *,
162 const char *, u_char[41]);
164 static void ChapMS_LANMan (u_char *, char *, int, u_char *);
167 static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE],
168 u_char NTResponse[24], const u_char PeerChallenge[16],
169 const u_char *rchallenge, const char *username,
170 u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]);
173 static void Set_Start_Key (ppp_pcb *pcb, const u_char *, const char *, int);
174 static void SetMasterKeys (ppp_pcb *pcb, const char *, int, u_char[24], int);
177 static void ChapMS (ppp_pcb *pcb, const u_char *, const char *, int, u_char *);
178 static void ChapMS2 (ppp_pcb *pcb, const u_char *, const u_char *, const char *, const char *, int,
179 u_char *, u_char[MS_AUTH_RESPONSE_LENGTH+1], int);
273 ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md);
312 ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name,
496 static void ChallengeResponse(const u_char *challenge,
497 const u_char PasswordHash[MD4_SIGNATURE_SIZE],
498 u_char response[24]) {
499 u_char ZPasswordHash[21];
501 u_char des_key[8];
534 static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallenge,
535 const char *username, u_char Challenge[8]) {
537 u_char sha1Hash[SHA1_SIGNATURE_SIZE];
564 static void ascii2unicode(const char ascii[], int ascii_len, u_char unicode[]) {
569 unicode[i * 2] = (u_char) ascii[i];
572 static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNATURE_SIZE]) {
582 static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_len,
583 u_char NTResponse[24]) {
584 u_char unicodePassword[MAX_NT_PASSWORD * 2];
585 u_char PasswordHash[MD4_SIGNATURE_SIZE];
594 static void ChapMS2_NT(const u_char *rchallenge, const u_char PeerChallenge[16], const char *username,
595 const char *secret, int secret_len, u_char NTResponse[24]) {
596 u_char unicodePassword[MAX_NT_PASSWORD * 2];
597 u_char PasswordHash[MD4_SIGNATURE_SIZE];
598 u_char Challenge[8];
610 static u_char *StdText = (u_char *)"KGS!@#$%"; /* key from rasapi32.dll */
612 static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len,
615 u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */
616 u_char PasswordHash[MD4_SIGNATURE_SIZE];
618 u_char des_key[8];
623 UcasePassword[i] = (u_char)toupper(secret[i]);
642 static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE],
643 u_char NTResponse[24], const u_char PeerChallenge[16],
644 const u_char *rchallenge, const char *username,
645 u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) {
649 static const u_char Magic1[39] = /* "Magic server to client signing constant" */
654 static const u_char Magic2[41] = /* "Pad to make it do more than one iteration" */
663 u_char Digest[SHA1_SIGNATURE_SIZE];
664 u_char Challenge[8];
692 u_char NTResponse[24], const u_char PeerChallenge[16],
693 const u_char *rchallenge, const char *username,
694 u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) {
695 u_char unicodePassword[MAX_NT_PASSWORD * 2];
696 u_char PasswordHash[MD4_SIGNATURE_SIZE];
697 u_char PasswordHashHash[MD4_SIGNATURE_SIZE];
714 static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len) {
715 u_char unicodePassword[MAX_NT_PASSWORD * 2];
716 u_char PasswordHash[MD4_SIGNATURE_SIZE];
717 u_char PasswordHashHash[MD4_SIGNATURE_SIZE];
719 u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */
744 static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_char NTResponse[24], int IsServer) {
745 u_char unicodePassword[MAX_NT_PASSWORD * 2];
746 u_char PasswordHash[MD4_SIGNATURE_SIZE];
747 u_char PasswordHashHash[MD4_SIGNATURE_SIZE];
749 u_char MasterKey[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */
750 u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */
751 const u_char *s;
754 static const u_char Magic1[27] =
760 static const u_char Magic2[84] =
772 static const u_char Magic3[84] =
838 static void ChapMS(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len,
873 static void ChapMS2(ppp_pcb *pcb, const u_char *rchallenge, const u_char *PeerChallenge,
875 u_char authResponse[], int authenticator) {