

{"id":81956,"date":"2020-09-05T13:41:34","date_gmt":"2020-09-05T08:11:34","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=81956"},"modified":"2026-06-01T12:09:09","modified_gmt":"2026-06-01T06:39:09","slug":"python-message-encode-decode","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/","title":{"rendered":"Message Encode Decode in Python with Tkinter"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:2514,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1i1_qHBqWNJ5utopNlTfYn9kSAPrVRSxB\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601063912\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1i1_qHBqWNJ5utopNlTfYn9kSAPrVRSxB\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-01 11:55:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-05 00:14:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-09 09:06:15&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-09 09:06:15&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p><strong>Python Message Encode-Decode<\/strong> &#8211; Secure your Information by Encoding the messages<\/p>\n<p>Encoding is the process that transforms the text or information to the unrecognizable form and decryption is the process to convert the encrypted message into original form.<\/p>\n<h3>Message Encode-Decode<\/h3>\n<p>Message encoding and decoding is the process to first convert the original text to the random and meaningless text called ciphertext. This process is called encoding. Decoding is the process to convert that ciphertext to the original text. This process is also called the Encryption-Decryption process.<\/p>\n<h2>Message Encode-Decode Python Project<\/h2>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81960\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg\" alt=\"python message encode decode\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<p>This objective of this project is to encode and decode messages using a common key. This project will be built using the Tkinter and base64 library.<\/p>\n<p>In this project, users have to enter the message to encode or decode. Users have to select the mode to choose the encoding and decoding process. The same key must be used to process the encoding and decoding for the same message.<\/p>\n<h3>Project Prerequisites<\/h3>\n<p>To build this project we will use basic concept of python, Tkinter, and base64 library.<\/p>\n<ul>\n<li><strong>Tkinter<\/strong> is a standard GUI python library<\/li>\n<li><strong>base64<\/strong> module provides a function to encode the binary data to ASCII characters and decode that ASCII characters back to binary data.<\/li>\n<\/ul>\n<p>To install the library we use pip install command on the command prompt<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">pip install tkinter\r\npip install base64\r\n<\/pre>\n<h3>Download Message Encode-Decode python code<\/h3>\n<p>Download source code of Message Encode-Decode Project &#8211; <a href=\"https:\/\/drive.google.com\/file\/d\/1i1_qHBqWNJ5utopNlTfYn9kSAPrVRSxB\/view?usp=drive_link\"><strong>Python Message Encode Decode Project<\/strong><\/a><\/p>\n<h3>Project File Structure<\/h3>\n<p>These are the step to build message encode &#8211; decode python project<\/p>\n<ul>\n<li>Import module<\/li>\n<li>Create display window<\/li>\n<li>Define function<\/li>\n<li>Define labels and buttons<\/li>\n<\/ul>\n<p>So this is what we will do in this python project. Let\u2019s start<\/p>\n<h3>Steps to develop message encode-decode project<\/h3>\n<h4>1. Import Libraries<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">from tkinter import *\r\nimport base64\r\n<\/pre>\n<p>The first step is to import tkinter and base64 libraries.<\/p>\n<h4>2. Initialize Window<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">root = Tk()\r\n\r\nroot.geometry('500x300')\r\nroot.resizable(0,0)\r\nroot.title(\"DataFlair - Message Encode and Decode\")\r\n<\/pre>\n<ul>\n<li><strong>Tk()<\/strong> initialized tkinter which means window created<\/li>\n<li><strong>geometry()<\/strong> set the width and height of the window<\/li>\n<li><strong>resizable(0,0)<\/strong> set the fixed size of the window<\/li>\n<li><strong>title()<\/strong> set the title of the window<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Label(root, text ='ENCODE DECODE', font = 'arial 20 bold').pack()\r\n\r\nLabel(root, text ='DataFlair', font = 'arial 20 bold').pack(side =BOTTOM)\r\n<\/pre>\n<p><strong>Label()<\/strong> widget use to display one or more than one line of text that users aren&#8217;t able to modify.<\/p>\n<ul>\n<li><strong>root<\/strong> is the name which we refer to our window<\/li>\n<li><strong>text<\/strong> which we display on the label<\/li>\n<li><strong>font<\/strong> in which the text is written<\/li>\n<li><strong>pack<\/strong> organized widget in block<\/li>\n<\/ul>\n<h4>3. Define variables<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Text = StringVar()\r\nprivate_key = StringVar()\r\nmode = StringVar()\r\nResult = StringVar()\r\n<\/pre>\n<ul>\n<li><strong>Text<\/strong> variable stores the message to encode and decode<\/li>\n<li><strong>private_key<\/strong> variable store the private key used to encode and decode<\/li>\n<li><strong>mode<\/strong> is used to select that is either encoding or decoding<\/li>\n<li><strong>Result<\/strong> store the result<\/li>\n<\/ul>\n<h4>4. Function to encode<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def Encode(key,message):\r\n    enc=[]\r\n\r\n    for i in range(len(message)):\r\n        key_c = key[i % len(key)]\r\n         enc.append(chr((ord(message[i]) + ord(key_c)) % 256))\r\n    return base64.urlsafe_b64encode(\"\".join(enc).encode()).decode()\r\n<\/pre>\n<p><strong>Encode function have arguments &#8211; key and message<\/strong><\/p>\n<ul>\n<li><strong>enc<\/strong> = [] is an empty list<\/li>\n<li>We run loop till the length of the message<\/li>\n<li>i% of len(key) gives the remainder of division between i and len(key) and that remainder used as an index of key the value of key at that index is stored in <strong>key_c<\/strong><\/li>\n<li><strong>ord()<\/strong> function takes string argument of a single unicode character and return its integer unicode value<\/li>\n<li><strong>chr()<\/strong> function takes an integer argument and returns the string.<\/li>\n<li><strong>ord (message[i])<\/strong> convert the value of message at index i into the integer value<\/li>\n<li><strong>ord(key_c)<\/strong> converts the key_c value to integer value<\/li>\n<li><strong>ord(message[i]) + ord(key_c)) % 256<\/strong> gives the remainder of division of addition of ord(message[i]) and ord( key_c) with 256 and passes that remainder to chr() function<\/li>\n<li><strong>chr()<\/strong> function converts that integer value to string and store to enc<\/li>\n<li><strong>base64.urlsafe_b64encode<\/strong> encode a string.<\/li>\n<li>The <strong>join()<\/strong> method joins each element of list, string, and tuple by a string separator and returns the concatenated string.<\/li>\n<li><strong>encode()<\/strong> method returns utf-8 encoded message of the string.<\/li>\n<li><strong>decode()<\/strong> method decodes the string.<\/li>\n<li><strong>return<\/strong> gives the result of the encoded string.<\/li>\n<\/ul>\n<h4>5. Function to decode<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def Decode(key,message):\r\n    dec=[]\r\n    message = base64.urlsafe_b64decode(message).decode()\r\n\r\n    for i in range(len(message)):\r\n        key_c = key[i % len(key)]\r\n        dec.append(chr((256 + ord(message[i])- ord(key_c)) % 256))\r\n    return \"\".join(dec)\r\n<\/pre>\n<p><strong>Decode()<\/strong> function has arguments &#8211; key, message<\/p>\n<ul>\n<li><strong>dec=[]<\/strong> is an empty list<\/li>\n<li>Decode the content from input and write the result in binary to the output<\/li>\n<li>We ran the loop till the length of the message<\/li>\n<li><strong>256 + ord(message[i]) &#8211; ord(key_c)) % 256<\/strong> gives the remainder of addition of 256 with subtraction of ord(message[i]) &#8211; ord( key_c) and then division with 256 and passes that remainder to chr() function<\/li>\n<li><strong>chr()<\/strong> function convert integer value to string and store to dec<\/li>\n<li><strong>return &#8220;&#8221;.join(dec)<\/strong> return the result<\/li>\n<\/ul>\n<h4>6. Function to set mode<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def Mode():\r\n    if(mode.get() == 'e'):\r\n        Result.set(Encode(private_key.get(), Text.get()))\r\n    elif(mode.get() == 'd'):\r\n        Result.set(Decode(private_key.get(), Text.get()))\r\n    else:\r\n        Result.set('Invalid Mode')\r\n<\/pre>\n<ul>\n<li>If the mode set by the user is \u2018<strong>e<\/strong>\u2019 then the <strong>Encode()<\/strong> function will be called<\/li>\n<li>If the mode set to &#8216;<strong>d<\/strong>&#8216; then the <strong>Decode()<\/strong> function will be called<\/li>\n<li>Else print \u2018<strong>invalid mode<\/strong>\u2019<\/li>\n<li><strong>private_key.get()<\/strong> and <strong>Text.get()<\/strong> values are pass to the arguments of Encode() and Decode() function<\/li>\n<\/ul>\n<h4>7. Function to exit window<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def Exit():\r\n    root.destroy()\r\n<\/pre>\n<p><strong>root.destroy()<\/strong> will quit the program by stopping the mainloop()<\/p>\n<h4>8. Function to reset window<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def Reset():\r\n    Text.set(\"\")\r\n    private_key.set(\"\")\r\n    mode.set(\"\")\r\n    Result.set(\"\")\r\n<\/pre>\n<p>This function set all variables to empty string<\/p>\n<h4>9. Labels and Buttons<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Label(root, font= 'arial 12 bold', text='MESSAGE').place(x= 60,y=60)\r\nEntry(root, font = 'arial 10', textvariable = Text, bg = 'ghost white').place(x=290, y = 60)\r\n\r\nLabel(root, font = 'arial 12 bold', text ='KEY').place(x=60, y = 90)\r\nEntry(root, font = 'arial 10', textvariable = private_key , bg ='ghost white').place(x=290, y = 90)\r\n\r\nLabel(root, font = 'arial 12 bold', text ='MODE(e-encode, d-decode)').place(x=60, y = 120)\r\nEntry(root, font = 'arial 10', textvariable = mode , bg= 'ghost white').place(x=290, y = 120)\r\nEntry(root, font = 'arial 10 bold', textvariable = Result, bg ='ghost white').place(x=290, y = 150)\r\n\r\nButton(root, font = 'arial 10 bold', text = 'RESULT'  ,padx =2,bg ='LightGray' ,command = Mode).place(x=60, y = 150)\r\n\r\nButton(root, font = 'arial 10 bold' ,text ='RESET' ,width =6, command = Reset,bg = 'LimeGreen', padx=2).place(x=80, y = 190)\r\n\r\nButton(root, font = 'arial 10 bold',text= 'EXIT' , width = 6, command = Exit,bg = 'OrangeRed', padx=2, pady=2).place(x=180, y = 190)\r\n\r\nroot.mainloop()\r\n<\/pre>\n<p><strong>Label()<\/strong> widget use to display one or more than one line of text that users aren&#8217;t able to modify.<\/p>\n<p><strong>Entry()<\/strong> widget used to create an input text field.<\/p>\n<p><strong>Button()<\/strong> widget used to display button on our window<\/p>\n<ul>\n<li>root is the name which we refer to our window<\/li>\n<li>text which we display on the label<\/li>\n<li>font in which the text is written<\/li>\n<li>insertwidth use to set the width of the insertion cursor<\/li>\n<li>bg sets the background colour<\/li>\n<li>command is call when the button is click<\/li>\n<li>textvariable used to retrieve the current text to the entry widget<\/li>\n<li>root.mainloop() is a method that executes when we want to run our program.<\/li>\n<\/ul>\n<h4>Message Encode-Decode Project output<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81961\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output.png\" alt=\"message encode output\" width=\"1366\" height=\"728\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output-300x160.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output-1024x546.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output-150x80.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output-768x409.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-encode-output-520x277.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81962\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output.png\" alt=\"message decode output\" width=\"1366\" height=\"728\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output-300x160.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output-1024x546.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output-150x80.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output-768x409.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/message-decode-output-520x277.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>We have successfully developed Message encode &#8211; decode project in Python. We used the popular tkinter library for rendering graphics on a display window and base64 to encode &amp; decode. We learned how to encode and decode the string, how to create button, widget, and pass the function to the button.<\/p>\n<p>In this way, we can encode our message and decode the encoded message in a secure way by using the key. We hope you enjoyed building this python project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python Message Encode-Decode &#8211; Secure your Information by Encoding the messages Encoding is the process that transforms the text or information to the unrecognizable form and decryption is the process to convert the encrypted&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":81960,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[23193,21082,22734],"class_list":["post-81956","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python-message-encode-decode","tag-python-project","tag-python-project-for-beginners"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Message Encode Decode in Python with Tkinter - DataFlair<\/title>\n<meta name=\"description\" content=\"Python Message Encode Decode - In this python project we will use basic concepts of python, Tkinter, and base64 library to encrypt and decrypt messages.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Message Encode Decode in Python with Tkinter - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Python Message Encode Decode - In this python project we will use basic concepts of python, Tkinter, and base64 library to encrypt and decrypt messages.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-05T08:11:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T06:39:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Message Encode Decode in Python with Tkinter - DataFlair","description":"Python Message Encode Decode - In this python project we will use basic concepts of python, Tkinter, and base64 library to encrypt and decrypt messages.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/","og_locale":"en_US","og_type":"article","og_title":"Message Encode Decode in Python with Tkinter - DataFlair","og_description":"Python Message Encode Decode - In this python project we will use basic concepts of python, Tkinter, and base64 library to encrypt and decrypt messages.","og_url":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-09-05T08:11:34+00:00","article_modified_time":"2026-06-01T06:39:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"Message Encode Decode in Python with Tkinter","datePublished":"2020-09-05T08:11:34+00:00","dateModified":"2026-06-01T06:39:09+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/"},"wordCount":990,"commentCount":20,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg","keywords":["python message encode decode","Python project","python project for beginners"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/","url":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/","name":"Message Encode Decode in Python with Tkinter - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg","datePublished":"2020-09-05T08:11:34+00:00","dateModified":"2026-06-01T06:39:09+00:00","description":"Python Message Encode Decode - In this python project we will use basic concepts of python, Tkinter, and base64 library to encrypt and decrypt messages.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/python-message-encode-decode.jpg","width":1200,"height":628,"caption":"python message encode decode"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-message-encode-decode\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Message Encode Decode in Python with Tkinter"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/81956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=81956"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/81956\/revisions"}],"predecessor-version":[{"id":148584,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/81956\/revisions\/148584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/81960"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=81956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=81956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=81956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}