IRC-Crypt

 view release on metacpan or  search on metacpan

Crypt.xs  view on Meta::CPAN

int
irc_delete_all_known_keys()
	OUTPUT:
		RETVAL
		
char *
irc_encrypt_message_to_address(addr, nick, message)
		char *	addr
		char *	nick
		char *	message
	PPCODE:
		char * ret;
		ret = irc_encrypt_message_to_address(addr,nick,message);
		if(ret)
		{
			XPUSHs(sv_2mortal(newSVpv(ret, 0)));
			free(ret); 
			XSRETURN(1);
		}
		XSRETURN(0);

char *
irc_encrypt_message_with_key(key, nick, message)
		char *	key
		char *	nick
		char *	message
	PPCODE:
		char * ret;
		ret = irc_encrypt_message_with_key(key,nick,message);
		if(ret)
		{
			XPUSHs(sv_2mortal(newSVpv(ret, 0)));
			free(ret); 
			XSRETURN(1);
		}
		XSRETURN(0);

void
irc_decrypt_message(msg)
		char *	msg
	PPCODE:
		char *rmsg;
		char *rnick;
		unsigned int tdiff = 0;
		int ret;
		
		ret = irc_decrypt_message(msg, &rmsg, &rnick, &tdiff);
		if(ret)
		{
			XPUSHs(sv_2mortal(newSVpv(rmsg, 0)));
			XPUSHs(sv_2mortal(newSVpv(rnick, 0)));

const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	/* IV		iv;	Uncomment this if you need to return IVs */
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
	type = constant(aTHX_ s, len);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv = sv_2mortal(newSVpvf("%s is not a valid IRC::Crypt macro", s));
          PUSHs(sv);
          break;
        case PERL_constant_NOTDEF:
          sv = sv_2mortal(newSVpvf(

fallback/const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	/* IV		iv;	Uncomment this if you need to return IVs */
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
	type = constant(aTHX_ s, len);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv = sv_2mortal(newSVpvf("%s is not a valid IRC::Crypt macro", s));
          PUSHs(sv);
          break;
        case PERL_constant_NOTDEF:
          sv = sv_2mortal(newSVpvf(



( run in 0.704 second using v1.01-cache-2.11-cpan-71847e10f99 )