Changeset 9df916f for crypting.c
- Timestamp:
- 2005-12-09T20:48:45Z (18 years ago)
- Branches:
- master
- Children:
- 34759e6
- Parents:
- c2295f7 (diff), 87c24ba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
crypting.c
rc2295f7 r9df916f 52 52 #include <stdlib.h> 53 53 54 #define irc_usermsg55 56 54 #endif 57 55 … … 62 60 \*/ 63 61 64 /* USE WITH CAUTION! 65 Sets pass without checking */ 66 void setpassnc (irc_t *irc, const char *pass) 67 { 68 if (irc->password) g_free (irc->password); 69 70 if (pass) { 71 irc->password = g_strdup (pass); 72 irc_usermsg (irc, "Password successfully changed"); 73 } else { 74 irc->password = NULL; 75 } 76 } 77 78 int setpass (irc_t *irc, const char *pass, const char* md5sum) 62 int checkpass (const char *pass, const char *md5sum) 79 63 { 80 64 md5_state_t md5state; … … 94 78 if (digits[1] != md5sum[j + 1]) return (-1); 95 79 } 96 97 /* If pass is correct, we end up here and we set the pass */ 98 setpassnc (irc, pass); 99 100 return (0); 101 } 80 81 return( 0 ); 82 } 83 102 84 103 85 char *hashpass (irc_t *irc) {
Note: See TracChangeset
for help on using the changeset viewer.