/[radius]/radius/lib/cryptpass.c
ViewVC logotype

Diff of /radius/lib/cryptpass.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by gray, Fri Aug 2 11:18:43 2002 UTC revision 1.3 by gray, Wed Apr 30 08:44:33 2003 UTC
# Line 1  Line 1 
1  /* This file is part of GNU RADIUS.  /* This file is part of GNU Radius.
2     Copyright (C) 2000, 2001 Sergey Poznyakoff     Copyright (C) 2000,2001,2002,2003 Sergey Poznyakoff
3        
4     This program is free software; you can redistribute it and/or modify     GNU Radius is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.     (at your option) any later version.
8        
9     This program is distributed in the hope that it will be useful,     GNU Radius is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.     GNU General Public License for more details.
13        
14     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software Foundation,     along with GNU Radius; if not, write to the Free Software Foundation,
16     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17    
18  #ifndef lint  #ifndef lint
# Line 48  static char rcsid[] = Line 48  static char rcsid[] =
48        concatenation. */        concatenation. */
49    
50  void  void
51  encrypt_password(pair, password, vector, secret)  encrypt_password(VALUE_PAIR *pair,
52          VALUE_PAIR *pair;                   char *password, /* Cleantext password */
53          char *password; /* Cleantext password */                   char *vector,   /* Request authenticator */
54          char *vector;   /* Request authenticator */                   char *secret)   /* Shared secret */
         char *secret;   /* Shared secret */  
55  {  {
56          int passlen;          int passlen;
57          int secretlen;          int secretlen;
# Line 97  encrypt_password(pair, password, vector, Line 96  encrypt_password(pair, password, vector,
96  }  }
97    
98  void  void
99  decrypt_password(password, pair, vector, secret)  decrypt_password(char *password, /* At least AUTH_STRING_LEN+1 characters long */
100          char *password;   /* At least AUTH_STRING_LEN+1 characters long */                   VALUE_PAIR *pair, /* Password pair */
101          VALUE_PAIR *pair; /* Password pair */                   char *vector,     /* Request authenticator */
102          char *vector;     /* Request authenticator */                   char *secret)     /* Shared secret */
         char *secret;     /* Shared secret */  
103  {  {
104          int md5len;          int md5len;
105          char *md5buf;          char *md5buf;
# Line 140  decrypt_password(password, pair, vector, Line 138  decrypt_password(password, pair, vector,
138  /* Decrypt a password encrypted using broken algorythm.  /* Decrypt a password encrypted using broken algorythm.
139     This is for use with such brain-damaged NASes as MAX ascend. */     This is for use with such brain-damaged NASes as MAX ascend. */
140  void  void
141  decrypt_password_broken(password, pair, vector, secret)  decrypt_password_broken(char *password, /* At least AUTH_STRING_LEN+1
142          char *password;   /* At least AUTH_STRING_LEN+1 characters long */                                             characters long */
143          VALUE_PAIR *pair; /* Password pair */                          VALUE_PAIR *pair, /* Password pair */
144          char *vector;     /* Request authenticator */                          char *vector,     /* Request authenticator */
145          char *secret;     /* Shared secret */                          char *secret)     /* Shared secret */
146  {  {
147          int md5len;          int md5len;
148          char *md5buf;          char *md5buf;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26