katana.units.crypto.dna — T,A,C,G,U DNA Letters

DNA/Codon Cipher.

This unit will translate groupings of letters (A,T,C,G,U) into 22 out of 26 possible English characters.

This unit inherits from the katana.unit.NotEnglishAndPrintableUnit class, as we can expect the data to still be printable characters (letters, numbers and punctuation) but not readable English. It also inherits from the katana.units.crypto.CryptoUnit class to ensure it is not a viable URL or potentially useful file.

class katana.units.crypto.dna.Unit(*args, **kwargs)

Bases: katana.unit.NotEnglishAndPrintableUnit, katana.units.crypto.CryptoUnit

BLOCKED_GROUPS = ['crypto']

This unit does not recurse into other Crypto units because that might spiral into a disaster.

GROUPS = ['crypto', 'dna']

These are “tags” for a unit. Considering it is a Crypto unit, “crypto” is included, as well as the name of the unit, “dna”.

PRIORITY = 50

Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty.

RECURSE_SELF = False

This unit should not recurse into itself. That could spiral in to an infinite loop.

evaluate(case: Any) → None

Evaluate the target.

Read individual Codon groupings and replace them with the corresponding English character.

Parameters:case – A case returned by enumerate. In this case, the enumerate function is not used.
Returns:None. This function should not return any data.