typemap 616 B

12345678910111213141516171819202122232425262728293031323334
  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. INPUT
  10. T_CBLOCK
  11. $var=(des_cblock *)SvPV($arg,len);
  12. if (len < DES_KEY_SZ)
  13. {
  14. croak(\"$var needs to be at least %u bytes long\",DES_KEY_SZ);
  15. }
  16. T_SCHEDULE
  17. $var=(des_key_schedule *)SvPV($arg,len);
  18. if (len < DES_SCHEDULE_SZ)
  19. {
  20. croak(\"$var needs to be at least %u bytes long\",
  21. DES_SCHEDULE_SZ);
  22. }
  23. OUTPUT
  24. T_CBLOCK
  25. sv_setpvn($arg,(char *)$var,DES_KEY_SZ);
  26. T_SCHEDULE
  27. sv_setpvn($arg,(char *)$var,DES_SCHEDULE_SZ);
  28. T_DESCHARP
  29. sv_setpvn($arg,(char *)$var,len);