Home | History | Annotate | Download | only in des
      1 #
      2 # DES SECTION
      3 #
      4 deschar *	T_DESCHARP
      5 des_cblock *	T_CBLOCK
      6 des_cblock	T_CBLOCK
      7 des_key_schedule	T_SCHEDULE
      8 des_key_schedule *	T_SCHEDULE
      9 
     10 INPUT
     11 T_CBLOCK
     12 	$var=(des_cblock *)SvPV($arg,len);
     13 	if (len < DES_KEY_SZ)
     14 		{
     15 		croak(\"$var needs to be at least %u bytes long\",DES_KEY_SZ);
     16 		}
     17 
     18 T_SCHEDULE
     19 	$var=(des_key_schedule *)SvPV($arg,len);
     20 	if (len < DES_SCHEDULE_SZ)
     21 		{
     22 		croak(\"$var needs to be at least %u bytes long\",
     23 			DES_SCHEDULE_SZ);
     24 		}
     25 
     26 OUTPUT
     27 T_CBLOCK
     28 	sv_setpvn($arg,(char *)$var,DES_KEY_SZ);
     29 
     30 T_SCHEDULE
     31 	sv_setpvn($arg,(char *)$var,DES_SCHEDULE_SZ);
     32 
     33 T_DESCHARP
     34 	sv_setpvn($arg,(char *)$var,len);
     35