Skip to content

Commit 16a238f

Browse files
author
Christophe Oosterlynck
committed
RadioGatun: fixed copy() method
deepcopy can be used
1 parent 4b50414 commit 16a238f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/CryptoPlus/Hash/pyradiogatun.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,9 @@ def copy(self):
278278
to efficiently compute the digests of strings that share
279279
a common initial substring.
280280
"""
281-
if 0: # set this to 1 to make the flow space crash
282-
return copy.deepcopy(self)
283-
clone = self.__class__()
284-
clone.length = self.length
285-
clone.count = [] + self.count[:]
286-
clone.input = "" + self.input
287-
clone.S = self.S
288-
return clone
281+
282+
import copy
283+
return copy.deepcopy(self)
289284

290285
# ======================================================================
291286
# TOP LEVEL INTERFACE

0 commit comments

Comments
 (0)