# ---?--- # # $Id: misc.xs,v 1.2 2004/04/08 01:36:21 mdw Exp $ # # Miscellaneous function interfaces # # (c) 2001 Straylight/Edgeware # #----- Licensing notice ----------------------------------------------------- # # This file is part of the Perl interface to Catacomb. # # Catacomb/Perl is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Catacomb/Perl is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Catacomb/Perl; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. MODULE = Catacomb PACKAGE = Catacomb::Passphrase SV * read(me, tag, len = 256) SV *me char *tag int len CODE: RETVAL = NEWSV(0, len); if (passphrase_read(tag, PMODE_READ, SvPVX(RETVAL), len + 1)) XSRETURN_UNDEF; SvCUR_set(RETVAL, strlen(SvPVX(RETVAL))); SvPOK_on(RETVAL); OUTPUT: RETVAL SV * verify(me, tag, len = 256) SV *me char *tag int len CODE: RETVAL = NEWSV(0, len); if (passphrase_read(tag, PMODE_VERIFY, SvPVX(RETVAL), len + 1)) XSRETURN_UNDEF; SvCUR_set(RETVAL, strlen(SvPVX(RETVAL))); SvPOK_on(RETVAL); OUTPUT: RETVAL SV * cancel(me, tag) SV *me char *tag CODE: passphrase_cancel(tag); XSRETURN_UNDEF; MODULE = Catacomb PACKAGE = Catacomb::KeySize int keysz(ksz, sz) keysize *ksz int sz CODE: RETVAL = keysz(sz, ksz); OUTPUT: RETVAL #----- That's all, folks ----------------------------------------------------