<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luka Bubalo</title>
    <description>The latest articles on DEV Community by Luka Bubalo (@lukebee).</description>
    <link>https://dev.to/lukebee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F351390%2F2bc08994-902f-4ae5-8353-295b7680f7bd.jpeg</url>
      <title>DEV Community: Luka Bubalo</title>
      <link>https://dev.to/lukebee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lukebee"/>
    <language>en</language>
    <item>
      <title>Printer steganography or "Is your printer spying on you"</title>
      <dc:creator>Luka Bubalo</dc:creator>
      <pubDate>Mon, 07 Dec 2020 09:03:02 +0000</pubDate>
      <link>https://dev.to/bornfightcompany/printer-steganography-or-is-you-printer-spying-on-you-4kk4</link>
      <guid>https://dev.to/bornfightcompany/printer-steganography-or-is-you-printer-spying-on-you-4kk4</guid>
      <description>&lt;p&gt;Lately, I’ve been solving information security challenges on &lt;a href="https://www.root-me.org/?page=news&amp;amp;lang=en" rel="noopener noreferrer"&gt;RootMe&lt;/a&gt; and I came across an interesting steganography challenge that has surprised me. Just a small digression for those who are not familiar with RootMe which is a platform where you can find a lot of interesting security challenges from different topics like cryptanalysis, steganography, servers security, programming, etc. If you are interested in security, RootMe is the place where you can learn a lot of stuff and have fun at the same time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6389g1mgah348109rv29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6389g1mgah348109rv29.png" alt="RootMe Challenge #18"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The challenge
&lt;/h2&gt;

&lt;p&gt;So the &lt;a href="https://www.root-me.org/en/Challenges/Steganography/Yellow-dots" rel="noopener noreferrer"&gt;problem&lt;/a&gt; goes like this, you are given a scan of a printed document and your goal is to find the date of printing as well as the serial number of the printer. At first, I didn’t know what to do and I was trying to find clues in the text and the file itself. Of course, there was nothing within the text nor the file that I could use to solve this problem so I decided to read the reference that was given. The reference text described how some printers are using &lt;strong&gt;hidden digital watermarks&lt;/strong&gt; called yellow dots or MIC (Machine Identification Code) allowing the printer to mark the identification of the device with which a document was printed and the date of printing. At first, I thought someone has a really good imagination and this challenge is completely fancied, but after some google searches I have found that this is real.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;Many printers use this type of watermarking and according to Wikipedia it was developed by Canon and Xerox in the mid-1980s but it was kept secret until 2004. According to Xerox, the main motivation behind this watermarking technique was to assure that their printers &lt;strong&gt;won’t be used to counterfeit money&lt;/strong&gt;. In 2004 Dutch authorities were using this to track down the counterfeiters who had used Canon printers and this hidden property became public. Also, there are rumors that all major manufacturers of color laser printers entered a &lt;strong&gt;secret agreement with governments to ensure that the output of those printers is forensically traceable.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpgxb6lr06r577y2i70ah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpgxb6lr06r577y2i70ah.png" alt="MIC from Wikipedia"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, you can see how MIC looks on the paper. Every row has a certain number value, and every column has its data purpose in this yellow dots matrix.&lt;/p&gt;

&lt;p&gt;If you find this interesting, try to solve the challenge. Good luck and have fun! &lt;/p&gt;

</description>
      <category>engineeringmonday</category>
      <category>steganography</category>
      <category>yellowdots</category>
      <category>printers</category>
    </item>
    <item>
      <title>How to share a secret?</title>
      <dc:creator>Luka Bubalo</dc:creator>
      <pubDate>Mon, 21 Sep 2020 08:43:20 +0000</pubDate>
      <link>https://dev.to/bornfightcompany/how-to-share-a-secret-2ffb</link>
      <guid>https://dev.to/bornfightcompany/how-to-share-a-secret-2ffb</guid>
      <description>&lt;p&gt;Imagine, you are in the room with a group of total strangers and you are able to share secret information out loud with the one person of your choice, while everyone else is listening. Sounds a bit impossible at first thought, right? How could you say something out loud so that only one person will be able to understand what you are saying? Ok, you might start talking in &lt;a href="https://en.wikipedia.org/wiki/Dumi_language" rel="noopener noreferrer"&gt;Dumi language&lt;/a&gt; in hope that only that person understands it. But what if that person doesn’t understand Dumi or, the worst case, someone else does and your secret suddenly becomes compromised? What if you could publicly create a shared language only that person and you will understand? This is where the &lt;strong&gt;Diffie-Hellman key exchange&lt;/strong&gt; method comes into play.&lt;/p&gt;

&lt;h2&gt;
  
  
  Diffie-Hellman key exchange
&lt;/h2&gt;

&lt;p&gt;“The Diffie–Hellman key exchange method allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure channel. This key can then be used to encrypt subsequent communications using a symmetric key cipher.” - Wikipedia&lt;/p&gt;

&lt;p&gt;Now when we are done with the formal definition, let’s see what this really means.&lt;/p&gt;

&lt;p&gt;Let’s say that our well-known security friends Alice and Bob want to perform a Diffie-Hellman key exchange. In the first step, they agree on publicly known information, let’s call it a common key, which will later be used to create a shared secret - key that will be used to encrypt all the communication between them. After they agree on the common key, both of them create a secret key that they keep for themselves. In the third step, both Alice and Bob combine the common key with their secret key and exchange that combination publicly. The most important presumption here is that it is &lt;strong&gt;nearly impossible to disassemble that combined key into initial parts&lt;/strong&gt; - common key and secret key. Otherwise, this method wouldn’t make sense. Now you might be asking yourself how is this possible, but we will tackle this later on.&lt;br&gt;
After the exchange of the combinations (Alice gets the combination of Bob’s private key and common key and vice versa), they again, each on their side, combine the private key with the combination they got from the other party. After this process is done, they will end up with the same key, the one that only Alice and Bob know and which is then used to encrypt the communication between them. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkw9k6y2lcc0t85bceed1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkw9k6y2lcc0t85bceed1.png" alt="Diffie-Hellman illustration"&gt;&lt;/a&gt;&lt;/p&gt;
Photo by Wikipedia



&lt;h2&gt;
  
  
  Mathematics behind the Diffie-Hellman
&lt;/h2&gt;

&lt;p&gt;In the first part of this post, we talked about how Diffie-Hellman works in a more abstract way. In this part, you will dive deeper and see how Diffie-Hellman works in terms of mathematics and how it is even possible to perform such a method. &lt;/p&gt;

&lt;p&gt;Before we start, I hope you are all familiar with the &lt;strong&gt;modulo arithmetic&lt;/strong&gt;, but let’s have a quick look.&lt;/p&gt;

&lt;p&gt;a mod b (a modulo b) is a remainder of dividing a with b. &lt;br&gt;
E.g. 11 mod 3 = 2, because 11/3 is 3 with the remainder 2.&lt;/p&gt;

&lt;p&gt;You can imagine modulo arithmetic as circling around a clock which has numbers from 0 to (b - 1). According to the above example, the clock would have numbers 0, 1, 2 and you will make 3 circles around the clock ending up at number 2.&lt;/p&gt;

&lt;p&gt;Now we are ready to see what happens under the hood while performing Diffie-Hellman.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faw5ncpx3hvk5qvq6jwn9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faw5ncpx3hvk5qvq6jwn9.png" alt="Diffie-Hellman math illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember that assumption about how it is nearly impossible to disassemble the combination of private and common keys? Let’s have a look at the fourth step where all the “magic” happens.&lt;br&gt;
Imagine you are an attacker who wants to break the encryption. All you have to do is to find out what is the number A or B (Alice’s or Bob’s secrets) from (P^A mod N) or (P^B mod N). Because, if you find out, for example, A, then you can easily calculate (P^B)^A mod N to get the shared secret and break the encryption.&lt;/p&gt;

&lt;p&gt;It may sound easy at first, but it is a difficult problem, even for supercomputers. The problem is called the &lt;a href="https://www.youtube.com/watch?v=SL7J8hPKEWY&amp;amp;ab_channel=KhanAcademyLabs" rel="noopener noreferrer"&gt;Discrete logarithm problem&lt;/a&gt; and it is not feasible in &lt;a href="https://mathworld.wolfram.com/PolynomialTime.html" rel="noopener noreferrer"&gt;polynomial time&lt;/a&gt;. You can think of a solution for this problem as a &lt;strong&gt;brute-force algorithm&lt;/strong&gt;, which iterates through all numbers between [1, N] and finds the numbers that satisfy the formula (P^A mod N) where only one corresponds to the real A. &lt;/p&gt;

&lt;p&gt;When it comes to encrypted communication there is always a challenge to exchange symmetric keys so both parties can encrypt and decrypt the data with only one key, since the asymmetric encryption (one key is used for encryption and the other is used for decryption) is time-costly and unsuitable for fast communication. Diffie-Hellman is one way of tackling this problem. Another way of doing this is to use asymmetric encryption to encrypt and exchange the symmetric key which will then be used to encrypt the communication (encrypt the symmetric key with the public asymmetric key so it can be only decrypted with the private key). For example, this kind of key exchange happens every time you visit some website via HTTPS protocol in the so-called HTTPS handshake.&lt;/p&gt;

&lt;p&gt;That’s all folks! Thanks for reading, and if you have any questions, feel free to leave them in the comments section. Cheers! :)&lt;/p&gt;

</description>
      <category>engineeringmonday</category>
      <category>security</category>
      <category>cryptography</category>
      <category>diffiehellman</category>
    </item>
    <item>
      <title>The basics of using the delegation pattern</title>
      <dc:creator>Luka Bubalo</dc:creator>
      <pubDate>Mon, 11 May 2020 08:03:30 +0000</pubDate>
      <link>https://dev.to/bornfightcompany/the-basics-of-using-the-delegation-pattern-41gh</link>
      <guid>https://dev.to/bornfightcompany/the-basics-of-using-the-delegation-pattern-41gh</guid>
      <description>&lt;h3&gt;
  
  
  Why?
&lt;/h3&gt;

&lt;p&gt;Recently I’ve started with the development of iOS applications and stumbled upon an interesting design pattern called delegation pattern. Abstractly talking, the main idea behind this pattern is to receive and process information in class A when something happens in class B. &lt;br&gt;
In this case, class A is the delegatee/worker, and class B is delegator/master. Specifically, when something happens on screen B, we want screen A to act accordingly. Also, the really good thing about this pattern is that you can have as many workers/delegatees as you want, they just need to implement the protocol.&lt;/p&gt;

&lt;p&gt;I will give you an example written in Swift, but this can, of course, be applied in any other programming language which supports the object-oriented paradigm. &lt;/p&gt;
&lt;h3&gt;
  
  
  How?
&lt;/h3&gt;

&lt;p&gt;Let’s say we have two screens, the first one is a profile screen where all information about the profile is shown like nickname, country, you name it.&lt;br&gt;
The second one is the settings screen where we can change those profile information. What we want to achieve is that when we adjust that information on the settings screen and click the save button, we want that data to be propagated back to our profile screen. So basically, the settings screen is a delegator and the profile screen is a delegatee who will receive the data from its delegator and display it.&lt;/p&gt;

&lt;p&gt;Before we start with the code example, let’s see what the flow for implementing delegate pattern looks like: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define the delegate protocol &lt;/li&gt;
&lt;li&gt;Add delegate property in the delegator&lt;/li&gt;
&lt;li&gt;Extend the delegatee class so it implements the delegate protocol&lt;/li&gt;
&lt;li&gt;Assign the delegatee object as delegate property in the delegator&lt;/li&gt;
&lt;li&gt;Call the delegatee from the delegator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the code example:&lt;/p&gt;

&lt;p&gt;Note: if you are not familiar with Swift, the protocol is the same as the interface in languages like Java, C#, PHP, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;protocol&lt;/span&gt; &lt;span class="kt"&gt;MyProfileSettingsViewControllerDelegate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;AnyObject&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;didChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Profile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;MyProfileSettingsViewController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;UIViewController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// ...&lt;/span&gt;

    &lt;span class="k"&gt;weak&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;delegate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;MyProfileSettingsViewControllerDelegate&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;saveButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIBarButtonItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Save"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;#selector(&lt;/span&gt;&lt;span class="nf"&gt;saveButtonTapped&lt;/span&gt;&lt;span class="kd"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;saveButtonTapped&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;profile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Profile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// populate Profile model with new data&lt;/span&gt;
        &lt;span class="n"&gt;delegate&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;didChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// pass updated Profile model to delegatee&lt;/span&gt;

        &lt;span class="c1"&gt;// navigate to the profile screen&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;MyProfileViewController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;UIViewController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// ...&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;settingsButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIBarButtonItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Settings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;#selector(&lt;/span&gt;&lt;span class="nf"&gt;settingsButtonTapped&lt;/span&gt;&lt;span class="kd"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;settingsButtonTapped&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;controller&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="kt"&gt;MyProfileSettingsViewController&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt; &lt;span class="c1"&gt;// assign this object as delegatee&lt;/span&gt;

        &lt;span class="c1"&gt;// navigate to the profile screen&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;updateInfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Profile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;nicknameLabel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nickname&lt;/span&gt;
        &lt;span class="n"&gt;countryLabel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;country&lt;/span&gt;
        &lt;span class="c1"&gt;//...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// ...&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;extension&lt;/span&gt; &lt;span class="kt"&gt;MyProfileViewController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;MyProfileSettingsViewControllerDelegate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;didChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Profile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;updateInfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// update your view with new profile data adjusted on the settings screen&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope this was helpful to you. If you have any questions, feel free to leave them in the comments below. :)&lt;/p&gt;

&lt;p&gt;Thank you for reading! &lt;/p&gt;

</description>
      <category>swift</category>
      <category>designpattern</category>
      <category>engineeringmonday</category>
    </item>
  </channel>
</rss>
