constants.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Sodium;
  3. const CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;
  4. const CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;
  5. const CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;
  6. const CRYPTO_AEAD_AES256GCM_ABYTES = 16;
  7. const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32;
  8. const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0;
  9. const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8;
  10. const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16;
  11. const CRYPTO_AUTH_BYTES = 32;
  12. const CRYPTO_AUTH_KEYBYTES = 32;
  13. const CRYPTO_BOX_SEALBYTES = 16;
  14. const CRYPTO_BOX_SECRETKEYBYTES = 32;
  15. const CRYPTO_BOX_PUBLICKEYBYTES = 32;
  16. const CRYPTO_BOX_KEYPAIRBYTES = 64;
  17. const CRYPTO_BOX_MACBYTES = 16;
  18. const CRYPTO_BOX_NONCEBYTES = 24;
  19. const CRYPTO_BOX_SEEDBYTES = 32;
  20. const CRYPTO_KX_BYTES = 32;
  21. const CRYPTO_KX_PUBLICKEYBYTES = 32;
  22. const CRYPTO_KX_SECRETKEYBYTES = 32;
  23. const CRYPTO_GENERICHASH_BYTES = 32;
  24. const CRYPTO_GENERICHASH_BYTES_MIN = 16;
  25. const CRYPTO_GENERICHASH_BYTES_MAX = 64;
  26. const CRYPTO_GENERICHASH_KEYBYTES = 32;
  27. const CRYPTO_GENERICHASH_KEYBYTES_MIN = 16;
  28. const CRYPTO_GENERICHASH_KEYBYTES_MAX = 64;
  29. const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32;
  30. const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$';
  31. const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288;
  32. const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216;
  33. const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432;
  34. const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824;
  35. const CRYPTO_SCALARMULT_BYTES = 32;
  36. const CRYPTO_SCALARMULT_SCALARBYTES = 32;
  37. const CRYPTO_SHORTHASH_BYTES = 8;
  38. const CRYPTO_SHORTHASH_KEYBYTES = 16;
  39. const CRYPTO_SECRETBOX_KEYBYTES = 32;
  40. const CRYPTO_SECRETBOX_MACBYTES = 16;
  41. const CRYPTO_SECRETBOX_NONCEBYTES = 24;
  42. const CRYPTO_SIGN_BYTES = 64;
  43. const CRYPTO_SIGN_SEEDBYTES = 32;
  44. const CRYPTO_SIGN_PUBLICKEYBYTES = 32;
  45. const CRYPTO_SIGN_SECRETKEYBYTES = 64;
  46. const CRYPTO_SIGN_KEYPAIRBYTES = 96;
  47. const CRYPTO_STREAM_KEYBYTES = 32;
  48. const CRYPTO_STREAM_NONCEBYTES = 24;
  49. const CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 4;
  50. const CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 33554432;
  51. const CRYPTO_PWHASH_SALTBYTES = 16;
  52. const CRYPTO_PWHASH_STRPREFIX = '$argon2i$';
  53. const CRYPTO_PWHASH_OPSLIMIT_MODERATE = 6;
  54. const CRYPTO_PWHASH_MEMLIMIT_MODERATE = 134217728;
  55. const CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 8;
  56. const CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 536870912;