source: lib/arc.h @ 50c9996

Last change on this file since 50c9996 was f3351f0, checked in by Wilmer van der Gaast <wilmer@…>, at 2008-04-05T11:54:31Z

Fixed GLib <2.6 compatibility issue in arc.h. (G_GNUC_MALLOC)

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[df1694b]1/***************************************************************************\
2*                                                                           *
3*  BitlBee - An IRC to IM gateway                                           *
[a7b5925]4*  Simple (but secure) ArcFour implementation for safer password storage.   *
[df1694b]5*                                                                           *
[a7b5925]6*  Copyright 2007 Wilmer van der Gaast <wilmer@gaast.net>                   *
[df1694b]7*                                                                           *
8*  This program is free software; you can redistribute it and/or modify     *
9*  it under the terms of the GNU General Public License as published by     *
10*  the Free Software Foundation; either version 2 of the License, or        *
11*  (at your option) any later version.                                      *
12*                                                                           *
13*  This program is distributed in the hope that it will be useful,          *
14*  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
15*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
16*  GNU General Public License for more details.                             *
17*                                                                           *
18*  You should have received a copy of the GNU General Public License along  *
19*  with this program; if not, write to the Free Software Foundation, Inc.,  *
20*  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.              *
21*                                                                           *
22\***************************************************************************/
23
24
[a7b5925]25/* See arc.c for more information. */
[0aaca60]26
[a7b5925]27struct arc_state
[df1694b]28{
29        unsigned char S[256];
30        unsigned char i, j;
31};
32
[f3351f0]33#ifndef G_GNUC_MALLOC
34#define G_GNUC_MALLOC
35#endif
36
[ddcf491f]37G_GNUC_MALLOC struct arc_state *arc_keymaker( unsigned char *key, int kl, int cycles );
[a7b5925]38unsigned char arc_getbyte( struct arc_state *st );
[ddcf491f]39int arc_encode( char *clear, int clear_len, unsigned char **crypt, char *password, int pad_to );
[a7b5925]40int arc_decode( unsigned char *crypt, int crypt_len, char **clear, char *password );
Note: See TracBrowser for help on using the repository browser.