3 * $Id: passphrase.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
7 * (c) 1999 Straylight/Edgeware
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of Catacomb.
14 * Catacomb is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Library General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
19 * Catacomb is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with Catacomb; if not, write to the Free
26 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
30 #ifndef CATACOMB_PASSPHRASE_H
31 #define CATACOMB_PASSPHRASE_H
37 /*----- Header files ------------------------------------------------------*/
41 /*----- Data structures ---------------------------------------------------*/
43 /* --- Passphrase modes --- *
45 * @PMODE_VERIFY@ requests that the passphrase be repeated to make sure it's
54 /*----- Functions provided ------------------------------------------------*/
56 /* --- @passphrase_read@ --- *
58 * Arguments: @const char *tag@ = pointer to passphrase tag string
59 * @unsigned mode@ = reading mode
60 * @char *buf@ = pointer to destination buffer
61 * @size_t sz@ = size of destination buffer
63 * Returns: Zero if successful, nonzero on failure.
65 * Use: Reads a passphrase from the user, using some system-specific
66 * secure mechanism. The mechanism may keep a cache of
67 * passphrases, so the user may not necessarily be prompted.
70 extern int passphrase_read(const char */
*tag*/
, unsigned /*mode*/,
71 char */
*buf*/
, size_t /*sz*/);
73 /* --- @passphrase_cancel@ --- *
75 * Arguments: @const char *tag@ = pointer to passphrase tag string
79 * Use: Attempts to make the passphrase cache forget about a
80 * particular passphrase. This may be useful if the passphrase
81 * turns out to be wrong, or if the user is attempting to change
85 extern void passphrase_cancel(const char */
*tag*/
);
87 /*----- That's all, folks -------------------------------------------------*/