• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# DES SECTION
3#
4deschar *	T_DESCHARP
5des_cblock *	T_CBLOCK
6des_cblock	T_CBLOCK
7des_key_schedule	T_SCHEDULE
8des_key_schedule *	T_SCHEDULE
9
10INPUT
11T_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
18T_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
26OUTPUT
27T_CBLOCK
28	sv_setpvn($arg,(char *)$var,DES_KEY_SZ);
29
30T_SCHEDULE
31	sv_setpvn($arg,(char *)$var,DES_SCHEDULE_SZ);
32
33T_DESCHARP
34	sv_setpvn($arg,(char *)$var,len);
35