<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prathamesh Satam on Medium]]></title>
        <description><![CDATA[Stories by Prathamesh Satam on Medium]]></description>
        <link>https://medium.com/@prathamsatam67?source=rss-29dc43cd1c5f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TWtLHlRJQnUYvddl.jpg</url>
            <title>Stories by Prathamesh Satam on Medium</title>
            <link>https://medium.com/@prathamsatam67?source=rss-29dc43cd1c5f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 00:12:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prathamsatam67/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OOP for Beginner]]></title>
            <link>https://prathamsatam67.medium.com/oop-for-beginner-de15e2fe7785?source=rss-29dc43cd1c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/de15e2fe7785</guid>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[oop-concepts]]></category>
            <category><![CDATA[oops-interview-questions]]></category>
            <dc:creator><![CDATA[Prathamesh Satam]]></dc:creator>
            <pubDate>Fri, 01 Oct 2021 19:04:28 GMT</pubDate>
            <atom:updated>2021-10-01T19:04:28.850Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello guys, I’m writing this article for beginners who want to learn basic oop’s concept. Here I’m going to talk about what is oops and what are the features available with the oops concept. I’m not mapping concepts with any language. We will see it in future articles. Let’s begin our journey.</p><h3>What is OOP?</h3><p>OOP stands for Object-Oriented Programming. OOP is a paradigm based on wrapping pieces of data (variables) and behaviour (methods) related to data, into a special bundle called <strong>objects</strong>. Objects are created using blueprint means Classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*7q9K8WHCTPm-krjNTjkR0A.png" /><figcaption>Dog Class Diagram</figcaption></figure><p>Variables mean name, gender referred to as <strong>State</strong> and Methods mean setName referred as <strong>behaviour</strong> in class. Simply we can say a class is a combination of state and behaviour. Where the state is hidden from the world and behaviour is exposed publicly. The dog is the name of the class or blueprint we have created. The sign plus represent public visibility and minus for private.</p><h3>Pillars of OOP</h3><p>OOP is based on 4 pillars, concepts that differentiate it from other programming paradigms. Which are as below:</p><ul><li>Abstraction</li><li>Encapsulation</li><li>Polymorphism</li><li>Inheritance</li></ul><h3>Abstraction:</h3><p>Abstraction the word itself reveal what its stand for, Abstraction means the ability to show only essentials details. Eg. we have Car where we start the car by pressing a button but we don’t know what happens beneath the button press. Like which parts operate on simple press. We are just aware of a button and its behaviour we get after the operation.</p><h3>Encapsulation:</h3><p>In oop we have state and behaviour, wrapping these together into a single unit is called encapsulation. Where the state is private or hidden and behaviour is exposed to the world for functioning. We can say it data hiding capability of oop. In a technical context, we can say variables are hidden for other classes and only accessibly by methods of that class only.</p><p>It is possible to confuse between abstraction and encapsulation as both seems redundant. There are few basic difference</p><ul><li>Encapsulation is data hiding whereas Abstraction is implementation hiding.</li><li>Encapsulation is combining both state and behaviour, while abstraction is exposing behaviour while hiding implementation under it.</li></ul><h3>Polymorphism:</h3><p>Poly means many morphim means faces, simple terms many faces. Polymorphism means the ability to take more than one form. Means same name but different behaviour. Polymorphism can be performed by using method overloading, overriding and operator overloading.</p><p>In one line overloading is the same name but different parameters and behaviour. It is a compile-time polymorphism. Because behaviour linking is done at compile time.</p><p>Overriding is the same name, parameters but behave as per the provided context. It is run time polymorphism. Because behaviour linking is determined at run time by provided reference.</p><h3>Inheritance:</h3><p>It is a very important pillar in oop. It is a mechanism by which we can inherit the state and behaviour of the parent class. Depending on the visibility of state and behaviour. It provides reusability. Inheritance have multiple types like Single, Multilevel, Multiple, Hybrid. In the case of Inheritance, we have Parent class and child class, where child class can inherit state and behaviour of parent class also override or change the behaviour of parent class. This can be achieved by using the overriding principle.</p><p>These are some basic concepts related to OOP. Which every developer should know. In addition to this principle, we have types of relations between objects. We will see them in the next article. Thank you for reading hope it helped you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de15e2fe7785" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing files with Nginx]]></title>
            <link>https://prathamsatam67.medium.com/securing-files-with-nginx-c15eed74b50f?source=rss-29dc43cd1c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c15eed74b50f</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Prathamesh Satam]]></dc:creator>
            <pubDate>Fri, 16 Apr 2021 07:50:33 GMT</pubDate>
            <atom:updated>2021-04-16T09:27:57.045Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*Z_G2slJjV1MSaurlck2TUg.jpeg" /></figure><p>We all use HTTP servers to deploy our applications. NGINX is also an http web server which has a rich set of configurations which gives simplicity for applications.</p><p>We can deploy our react or other applications with Nginx. For the application to work with Nginx we need to configure it first. This configuration can be done inside <strong>nginx.conf</strong> file.</p><p>This article is not about how NGINX works, there are multiple articles you may find on web for same. Here we will see how we can secure a particular file path.</p><p>Our Nginx setup comes with basic features, if we want to add some new functionality then we need to compile Nginx with extra modules. So for securing links we need <strong>Secure Link module</strong>. Following are the steps required for compiling Nginx with secure link.</p><pre># install deps (Ubuntu)<br>sudo apt-get install -y build-essential libpcre3 libpcre3-dev libssl-dev<br><br>wget http://nginx.org/download/nginx-1.10.1.tar.gz<br>tar -xf nginx-1.10.1.tar.gz<br>cd nginx-1.10.1<br><br>./configure --with-http_ssl_module --add-module= --with-http_secure_link_module<br><br>make -j<br>sudo make install<br># nginx is now installed in /usr/local/nginx</pre><p>The final output will be our Nginx setup which we can copy and paste on any server and the start setup. To start the server we need to run the following command.</p><pre>root&gt;./nginx</pre><p>So with this, our Nginx is up and running. Now for storing files and accessing them over network, we need to configure it’s path in nginx.conf file. Following are the configuration we need to add</p><pre>location /files {<br>    secure_link $arg_token,$arg_expires;<br>    secure_link_md5 &quot;$secure_link_expires $uri $remote_addr secret&quot;;<br><br>    if ($secure_link = &quot;&quot;) {<br>        return 403;<br>    }<br><br>    if ($secure_link = &quot;0&quot;) {<br>        return 410;<br>    }<br><br>    ...<br>}</pre><p>Here Nginx automatically handles decryption and verification of hash. <strong>$arg_token &amp; $arg_expires</strong> are the query string params that needs to be pass along with the URL.</p><pre>secure_link_md5 &quot;$secure_link_expires $uri $remote_addr secret&quot;;</pre><p>This is a pattern that needs to be matched with md5 we are passing in the query string. We can have our own pattern.</p><pre>$secure_link = &quot;&quot;</pre><p>If the hash code doesn’t match then it will return an empty string. In that case, we are returning 403 error code.</p><pre>$secure_link = &quot;0&quot;</pre><p>Our token expires according to provided timestamp. If the token is expired then we will get 0 from secure_link. For that, we should return 401 error code.</p><p>Most important part is how to generate token. There are several ways from which we can generate our md5 hash. We can use any programming language for this. Here we will see how we can generate token using shell script.</p><pre><strong>echo -n ‘1483228740 /files/my_report.pdf 192.168.33.14 </strong>secret<strong>’ | openssl md5 -binary | openssl base64 | tr +/ -_ | tr -d =</strong></pre><pre><strong>URL Request Format:</strong></pre><pre><strong>http://&lt;domain-name&gt;/files/my_report.pdf?token=AUEnXC7T-Tfv9WLsWbf-mw&amp;expires=1483228740</strong></pre><p>This is how our URL should be defined. We should pass token and expires as a part of the query parameters.Our file will be accessed only if the <strong>token</strong> and the <strong>expires </strong>parameter<strong> </strong>is<strong> </strong>correct. That is how we can protect our files using secure link. Thanks for reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c15eed74b50f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>