You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the algorithms (AES, ...) are extending Algorithm, so they get this deepCopy method. However, calling it on an AES object does not create an AES instance but an Algorithm instance (creating later problems when relying on instanceof, in the enricher for example).
To solve this, the only solution is probably to add each subclass of Algorithm a "copy" constructor (like AES(AES aes), calling the super "copy" constructor of Algorithm given below) and to overwrite the deepCopy() method, in which we instantiate a new AES using this constructor.
Algorithm
contains thisdeepCopy
method:All the algorithms (AES, ...) are extending
Algorithm
, so they get thisdeepCopy
method. However, calling it on anAES
object does not create anAES
instance but anAlgorithm
instance (creating later problems when relying oninstanceof
, in theenricher
for example).To solve this, the only solution is probably to add each subclass of
Algorithm
a "copy" constructor (likeAES(AES aes)
, calling the super "copy" constructor ofAlgorithm
given below) and to overwrite thedeepCopy()
method, in which we instantiate a newAES
using this constructor.The text was updated successfully, but these errors were encountered: