3 # $Id: misc.xs,v 1.2 2004/04/08 01:36:21 mdw Exp $
5 # Miscellaneous function interfaces
7 # (c) 2001 Straylight/Edgeware
10 #----- Licensing notice -----------------------------------------------------
12 # This file is part of the Perl interface to Catacomb.
14 # Catacomb/Perl is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of the License, or
17 # (at your option) any later version.
19 # Catacomb/Perl 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 General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with Catacomb/Perl; if not, write to the Free Software Foundation,
26 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 MODULE = Catacomb PACKAGE = Catacomb::Passphrase
31 read(me, tag, len = 256)
36 RETVAL = NEWSV(0, len);
37 if (passphrase_read(tag, PMODE_READ, SvPVX(RETVAL), len + 1))
39 SvCUR_set(RETVAL, strlen(SvPVX(RETVAL)));
45 verify(me, tag, len = 256)
50 RETVAL = NEWSV(0, len);
51 if (passphrase_read(tag, PMODE_VERIFY, SvPVX(RETVAL), len + 1))
53 SvCUR_set(RETVAL, strlen(SvPVX(RETVAL)));
63 passphrase_cancel(tag);
66 MODULE = Catacomb PACKAGE = Catacomb::KeySize
73 RETVAL = keysz(sz, ksz);
77 #----- That's all, folks ----------------------------------------------------