Repository navigation
Commit 9121206
crypto: share digest length handling between HashInit overloads
The two Hash::HashInit() overloads duplicated the logic that
determines the digest length and validates the requested XOF output
length after the digest context is initialized. Move it into a shared
FinishHashInit() helper.
Assisted-by: Claude
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>1 parent 8dc536f commit 9121206
2 files changed
Lines changed: 18 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
| 712 | + | |
| 713 | + | |
719 | 714 | | |
720 | 715 | | |
721 | 716 | | |
| |||
738 | 733 | | |
739 | 734 | | |
740 | 735 | | |
741 | | - | |
742 | | - | |
743 | | - | |
| 736 | + | |
744 | 737 | | |
745 | | - | |
| 738 | + | |
746 | 739 | | |
747 | 740 | | |
748 | 741 | | |
749 | 742 | | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
754 | 751 | | |
755 | 752 | | |
756 | 753 | | |
757 | 754 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
| 755 | + | |
770 | 756 | | |
771 | 757 | | |
772 | 758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
0 commit comments