Repository navigation
Commit 430e4af
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 58fc230 commit 430e4af
2 files changed
Lines changed: 18 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
| 714 | + | |
| 715 | + | |
721 | 716 | | |
722 | 717 | | |
723 | 718 | | |
| |||
740 | 735 | | |
741 | 736 | | |
742 | 737 | | |
743 | | - | |
744 | | - | |
745 | | - | |
| 738 | + | |
746 | 739 | | |
747 | | - | |
| 740 | + | |
748 | 741 | | |
749 | 742 | | |
750 | 743 | | |
751 | 744 | | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
756 | 753 | | |
757 | 754 | | |
758 | 755 | | |
759 | 756 | | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
| 757 | + | |
772 | 758 | | |
773 | 759 | | |
774 | 760 | | |
| |||
| 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