import random
class SteganographyUtility():
    def __init__(self, key2):
        self.key2 = key2
    def get_required_length_of_cover_message(self, secret_meessage):
        secret_meessage_len = len(secret_meessage)
        num_bits_in_secret_message = secret_meessage_len*8
        num_bits_required_for_cover = num_bits_in_secret_message*self.key2
        num_nucleotides_for_cover = int(num_bits_required_for_cover/2)
        return num_nucleotides_for_cover
    def get_random_cover_message(self, secret_message, wrap_rand_neucleotide=False):
        length_of_cover_message = self.get_required_length_of_cover_message(secret_message)
        bases = ['A', 'C', 'T', 'G']
        cover_message = ''
        for i in range(0, length_of_cover_message):
            cover_message += bases[random.randint(0,3)]
        if wrap_rand_neucleotide:
            cover_message = bases[random.randint(0,3)]+cover_message+bases[random.randint(0,3)]
        return cover_message



