crypth.inc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. { defined earlier in unistdh.inc...
  2. function crypt(__key:Pchar; __salt:Pchar):Pchar;cdecl;external cryptlib name 'crypt';
  3. procedure setkey(__key:Pchar);cdecl;external cryptlib name 'setkey';
  4. procedure encrypt(__block:Pchar; __edflag:longint);cdecl;external cryptlib name 'encrypt';
  5. }
  6. type
  7. Pcrypt_data = ^crypt_data;
  8. crypt_data = record
  9. keysched : array[0..(16 * 8)-1] of char;
  10. sb0 : array[0..32767] of char;
  11. sb1 : array[0..32767] of char;
  12. sb2 : array[0..32767] of char;
  13. sb3 : array[0..32767] of char;
  14. crypt_3_buf : array[0..13] of char;
  15. current_salt : array[0..1] of char;
  16. current_saltbits : longint;
  17. direction : longint;
  18. initialized : longint;
  19. end;
  20. function crypt_r(__key:Pchar; __salt:Pchar; __data:Pcrypt_data):Pchar;cdecl;external cryptlib name 'crypt_r';
  21. procedure setkey_r(__key:Pchar; __data:Pcrypt_data);cdecl;external cryptlib name 'setkey_r';
  22. procedure encrypt_r(__block:Pchar; __edflag:longint; __data:Pcrypt_data);cdecl;external cryptlib name 'encrypt_r';
  23. { ---------------------------------------------------------------------
  24. Borland compatibility types
  25. ---------------------------------------------------------------------}
  26. Type
  27. TCryptData = crypt_data;
  28. PCryptData = ^TCryptData;