Exemple #1
0
    def test_decode_text_extract_rus(self):
        original_text_words = self.original_text.split()
        original_extract = ' '.join(
            original_text_words[:len(original_text_words) // 2])
        encoded_extract = decode.encode_text(original_extract, self.code)

        decoded_extract = decode.decode_text(encoded_extract, self.language)
        self.assertEqual(original_extract, decoded_extract)
Exemple #2
0
    def test_decode_text_extract_rus(self):
        original_text_words = self.original_text.split()
        original_extract = ' '.join(
                    original_text_words[: len(original_text_words) // 2])
        encoded_extract = decode.encode_text(original_extract, self.code)

        decoded_extract = decode.decode_text(encoded_extract, self.language)
        self.assertEqual(original_extract, decoded_extract)
Exemple #3
0
def Steganography(): 
    userinput = int(input("Image Steganography \n 1. Encode the data \n 2. Decode the data \n 3. Exit \n Choose mode: "))
    
    if userinput == 1:
      print("\nEncoding....")
      encode_text() 
          
    elif userinput == 2:
      print("\nDecoding....") 
      print("Decoded message is " + decode_text()) 
    
    elif userinput == 3:
      print("Bye!....")

    else: 
        raise Exception("Enter correct input \n 1. Encode the data \n 2. Decode the data \n 3. Exit") 
Exemple #4
0
    def test_decode_text_same_rus(self):
        encoded_text = decode.encode_text(self.original_text, self.code)

        decoded_text = decode.decode_text(encoded_text, self.language)
        self.assertEqual(self.original_text, decoded_text)
Exemple #5
0
    def test_decode_text_same_rus(self):
        encoded_text = decode.encode_text(self.original_text, self.code)

        decoded_text = decode.decode_text(encoded_text, self.language)
        self.assertEqual(self.original_text, decoded_text)