hashalgorithm.go 853 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package godicttls
  2. // source: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
  3. // last updated: March 2023
  4. const (
  5. HashAlg_none uint8 = 0 // deprecated in TLS 1.3
  6. HashAlg_md5 uint8 = 1 // deprecated in TLS 1.3
  7. HashAlg_sha1 uint8 = 2
  8. HashAlg_sha224 uint8 = 3 // deprecated in TLS 1.3
  9. HashAlg_sha256 uint8 = 4
  10. HashAlg_sha384 uint8 = 5
  11. HashAlg_sha512 uint8 = 6
  12. HashAlg_Intrinsic uint8 = 8
  13. )
  14. var DictHashAlgorithmValueIndexed = map[uint8]string{
  15. 0: "none",
  16. 1: "md5",
  17. 2: "sha1",
  18. 3: "sha224",
  19. 4: "sha256",
  20. 5: "sha384",
  21. 6: "sha512",
  22. 7: "Reserved",
  23. 8: "Intrinsic",
  24. }
  25. var DictHashAlgorithmNameIndexed = map[string]uint8{
  26. "none": 0,
  27. "md5": 1,
  28. "sha1": 2,
  29. "sha224": 3,
  30. "sha256": 4,
  31. "sha384": 5,
  32. "sha512": 6,
  33. "Reserved": 7,
  34. "Intrinsic": 8,
  35. }