Skip to content
Snippets Groups Projects
  1. Dec 05, 2023
    • Richard T. Carback III's avatar
      Use error wrapper · e577dc88
      Richard T. Carback III authored
      e577dc88
    • Richard T. Carback III's avatar
      There's a bug in this test where it's calculating a digestfor the nil... · 6d5e23a8
      Richard T. Carback III authored
      There's a bug in this test where it's calculating a digestfor the nil preimage. This is caused by using `.Sum` with a byte slice, which one might think includes that slice in the hash, but in fact only appends to that slice.
      
      This is a regular mistake, and the situation becomes incredibly confusing when you look at the blake2b implemenation which has `.Sum` functions that work the way one might expect. Since it is becoming a checklist item, I think that qualifies `.Sum` as at least confusing and needing specific rules (imo it should be deprecated as well, its fine at first glance but seems sloppy in practice given how often devs mess it up).
      
      Moving forward, `.Sum(nil)` is the only acceptable usage and anything else should be changed unless there's a very defensible reason AND a comment explaining why it is the way it is.
      6d5e23a8
  2. Jan 24, 2023
  3. Jan 13, 2023
  4. Nov 04, 2022
  5. Oct 17, 2022
  6. Sep 13, 2022
  7. Sep 08, 2022
  8. Sep 07, 2022
  9. Sep 06, 2022
  10. Sep 02, 2022
  11. Apr 29, 2022
  12. Oct 30, 2020
  13. Aug 05, 2020
Loading