File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -154,10 +154,6 @@ const (
154154)
155155
156156func (o * OnionFatErrorDecrypter ) shiftHmacsLeft (hmacs []byte ) {
157- if len (hmacs ) != o .allHmacsLen {
158- panic ("invalid hmac block length" )
159- }
160-
161157 srcIdx := o .maxHops
162158 destIdx := 1
163159 copyLen := o .maxHops - 1
@@ -174,10 +170,6 @@ func (o *OnionFatErrorDecrypter) shiftHmacsLeft(hmacs []byte) {
174170}
175171
176172func (o * OnionFatErrorDecrypter ) shiftPayloadsLeft (payloads []byte ) {
177- if len (payloads ) != o .allPayloadsLen {
178- panic ("invalid payload block length" )
179- }
180-
181173 copy (payloads , payloads [o .payloadLen :o .maxHops * o .payloadLen ])
182174}
183175
Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ type OnionFatErrorEncrypter struct {
2626}
2727
2828func (o * OnionFatErrorEncrypter ) shiftHmacsRight (hmacs []byte ) {
29- if len (hmacs ) != o .allHmacsLen {
30- panic ("invalid hmac block length" )
31- }
32-
3329 srcIdx := o .totalHmacs - 2
3430 destIdx := o .totalHmacs - 1
3531 copyLen := 1
@@ -47,10 +43,6 @@ func (o *OnionFatErrorEncrypter) shiftHmacsRight(hmacs []byte) {
4743}
4844
4945func (o * OnionFatErrorEncrypter ) shiftPayloadsRight (payloads []byte ) {
50- if len (payloads ) != o .allPayloadsLen {
51- panic ("invalid payload block length" )
52- }
53-
5446 copy (payloads [o .payloadLen :], payloads )
5547}
5648
You can’t perform that action at this time.
0 commit comments