<?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: kirsty-simmonds</title>
    <description>The latest articles on DEV Community by kirsty-simmonds (@kirstysimmonds).</description>
    <link>https://dev.to/kirstysimmonds</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%2F141607%2Fa2119c3e-c573-4aaf-8422-222e4801a4da.png</url>
      <title>DEV Community: kirsty-simmonds</title>
      <link>https://dev.to/kirstysimmonds</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kirstysimmonds"/>
    <language>en</language>
    <item>
      <title>How to create iOS and Android splash screens for React Native </title>
      <dc:creator>kirsty-simmonds</dc:creator>
      <pubDate>Fri, 07 Aug 2020 09:17:16 +0000</pubDate>
      <link>https://dev.to/kirstysimmonds/how-to-create-ios-and-android-splash-screens-for-react-native-hnn</link>
      <guid>https://dev.to/kirstysimmonds/how-to-create-ios-and-android-splash-screens-for-react-native-hnn</guid>
      <description>&lt;h2&gt;
  
  
  An adventure in splash screens for React Native apps
&lt;/h2&gt;

&lt;p&gt;The splash screen you create here won't be beautiful, but it &lt;em&gt;will&lt;/em&gt; have all the correct plumbing so that you can iterate on the design later :).&lt;/p&gt;

&lt;p&gt;First, you’re going to need some images. When I started to create the splash screens for work, the final images we need to use weren’t yet ready, but &lt;a href="https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae"&gt;this tutorial&lt;/a&gt; points to &lt;a href="https://github.com/spencercarli/react-native-splash-screen-demo/tree/master/icon"&gt;these images on GitHub&lt;/a&gt;, which are a great stand-in.&lt;/p&gt;

&lt;p&gt;These images are in three sizes: @1x = 200px, @2x = 400px, &lt;a class="comment-mentioned-user" href="https://dev.to/3x"&gt;@3x&lt;/a&gt;
 = 600px. Save them somewhere you can find them again and I’ll tell you where to put them later in this tutorial, for iOS and Android.&lt;/p&gt;

&lt;p&gt;You need to make the background colour of your home screen a nice, incongruous colour until you’ve got both splash screens in place. This is so we can spot the dreaded ‘white flash’ with greater ease. I went with ‘backgroundColor: ‘pink’’ on the outermost View element. You can change this back to white or whatever other colour you need when you're done.&lt;/p&gt;

&lt;h3&gt;
  
  
  iOS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;open ios/{YourProjectName}.xcworkspace&lt;/code&gt; in your terminal and await the arrival of your project in XCode. Replace {YourProjectName} with the name of your project and remove the curly braces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We need to add a new image asset in Xcode now. You can find it in the leftmost menu in &lt;code&gt;YourProjectName &amp;gt; YourProjectName &amp;gt; Image.xcassets&lt;/code&gt;. You should then press the “+” in the second leftmost panel and then select ‘New Image Set’. You can call the image whatever you like. Now add the images you downloaded from the GitHub repo earlier. They will automatically attach themselves to the right pixel density, but because I wanted to be absolutely sure, I just dragged my images to the corresponding placeholders.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;code&gt;LaunchScreen.storyboard&lt;/code&gt; in the leftmost panel. You should see the name of your project and ‘Powered by React Native’ underneath it. You can remove or add to these as you like. I just left them as they were while I was working out the correct splash screen plumbing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you need to change the background colour of the View to something obnoxious so that any white flashes are more visible. If you click on View in the second leftmost panel, you can choose any colour you like from the Background dropdown. I went with the delightfully named System Blue Colour.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now we should add an Image View to our splash screen so we can include our icon. If you press the button with a “+” on it in the top right of the screen, you’ll get a pop-up menu with a search bar. Search Image View and click on it. One should appear on your splash screen layout.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is now an Image View section at the top of your rightmost panel menu. Using the Image dropdown, select your icon. Set the Content Mode to Aspect Fit using the same rightmost menu panel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the ruler icon, which is second from the right, and at the top of the rightmost panel on your screen. This will help us to centre the icon on devices of all sizes. Within the “Autoresizing” section, you need to click the red lines outside of the grey box until they are greyed out, and then click the arrows inside the box so that they are &lt;em&gt;not&lt;/em&gt; greyed out. They should be vivid red.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you can run your app. If you see no changes, erase the state of the simulator. &lt;em&gt;Now&lt;/em&gt; you should be seeing your changes if you weren’t before! You’ll also see a white flash. Let’s fix this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install React Native Splash Screen with &lt;code&gt;yarn add react-native-splash-screen&lt;/code&gt; or &lt;code&gt;npm install react-native-splash-screen —save&lt;/code&gt;, depending on which package manager you’re using.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using XCode, open the &lt;code&gt;AppDelegate.m&lt;/code&gt; file. You then need to add &lt;code&gt;#import &amp;lt;RNSplashScreen.h&amp;gt;&lt;/code&gt; with the other import statements, and then add &lt;code&gt;[RNSplashScreen show];&lt;/code&gt; above the &lt;code&gt;return YES;&lt;/code&gt; line towards the bottom of the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, in &lt;code&gt;App.js&lt;/code&gt; (or whatever the root of your project is), and import the useEffect hook in the same line as you import React, so: &lt;code&gt;import React, {useEffect} from 'react';&lt;br&gt;
&lt;/code&gt;. Now, outside of your return statement, include the following function:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
    SplashScreen.hide();
  }, []);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Android
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Remember those images you downloaded from GitHub earlier? We’ll be putting them in the correct place for Android now. The mipmap folders are in &lt;code&gt;android/app/src/res&lt;/code&gt;. Here is where each image should go:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;mipmap-mdpi = icon.png&lt;br&gt;
mipmap-hdpi = &lt;a href="mailto:icon@2x.png"&gt;icon@2x.png&lt;/a&gt;&lt;br&gt;
mipmap-xhdpi = &lt;a href="mailto:icon@3x.png"&gt;icon@3x.png&lt;/a&gt;&lt;br&gt;
mipmap-xxhdpi = &lt;a href="mailto:icon@3x.png"&gt;icon@3x.png&lt;/a&gt;&lt;br&gt;
mipmap-xxxhdpi = &lt;a href="mailto:icon@3x.png"&gt;icon@3x.png&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the correct images are in the correct folders, you need to rename them all to ‘icon.png’.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a file called ‘background_splash.xml’ in &lt;code&gt;android/app/src/res/drawable&lt;/code&gt;. You’ll need to create the &lt;code&gt;drawable&lt;/code&gt; directory yourself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now add this code to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;

&amp;lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;

    &amp;lt;item
        android:drawable="@color/purple"/&amp;gt;

    &amp;lt;item
        android:width="200dp"
        android:height="200dp"
        android:drawable="@mipmap/icon"
        android:gravity="center" /&amp;gt;

&amp;lt;/layer-list&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here, we’re setting up something called a layer-list, which is a list of layers, and then setting a soon-to-be-defined background colour and rendering our icon. The icon will be 200dp tall and wide, and it’ll be in the centre of the screen.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now we need to create a colors.xml file in &lt;code&gt;android/app/src/main/res/values&lt;/code&gt;, which is where we’ll define our purple colour.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;

&amp;lt;resources&amp;gt;
    &amp;lt;color name="purple"&amp;gt;#5951AA&amp;lt;/color&amp;gt;
&amp;lt;/resources&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now we need to create a new &lt;code&gt;SplashTheme&lt;/code&gt; in the &lt;code&gt;android/app/src/main/res/values/styles.xml&lt;/code&gt; file. With the code added, the file should look like this.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;resources&amp;gt;
    &amp;lt;!-- Base application theme. --&amp;gt;
    &amp;lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&amp;gt;
        &amp;lt;item name="android:windowDisablePreview"&amp;gt;true&amp;lt;/item&amp;gt;
        &amp;lt;item name="android:windowBackground"&amp;gt;@drawable/background_splash&amp;lt;/item&amp;gt;
    &amp;lt;/style&amp;gt;

    &amp;lt;style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar"&amp;gt;
        &amp;lt;item name="android:windowBackground"&amp;gt;@drawable/background_splash&amp;lt;/item&amp;gt;
    &amp;lt;/style&amp;gt;
&amp;lt;/resources&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now we need to tell the application to use the &lt;code&gt;SplashTheme&lt;/code&gt;. Open &lt;code&gt;AndroidManifest.xml&lt;/code&gt; and inside of the application tag, add the following code
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;activity
            android:name=".SplashActivity"
            android:theme="@style/SplashTheme"
            android:label="@string/app_name"&amp;gt;
            &amp;lt;intent-filter&amp;gt;
                &amp;lt;action android:name="android.intent.action.MAIN" /&amp;gt;
                &amp;lt;category android:name="android.intent.category.LAUNCHER" /&amp;gt;
            &amp;lt;/intent-filter&amp;gt;
&amp;lt;/activity&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then add &lt;code&gt;android:exported=“true"&lt;/code&gt; into the activity tag that’s called &lt;code&gt;.MainActivity&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The code in its entirety should look like this, of course with your own package name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.belongmobile" // replace w your package name!
    android:versionCode="1"
    android:versionName="1.0"&amp;gt;

    &amp;lt;uses-permission android:name="android.permission.INTERNET" /&amp;gt;
    &amp;lt;uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/&amp;gt;

    &amp;lt;application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:theme="@style/AppTheme"&amp;gt;

        &amp;lt;activity
            android:name=".SplashActivity"
            android:theme="@style/SplashTheme"
            android:label="@string/app_name"&amp;gt;
            &amp;lt;intent-filter&amp;gt;
                &amp;lt;action android:name="android.intent.action.MAIN" /&amp;gt;
                &amp;lt;category android:name="android.intent.category.LAUNCHER" /&amp;gt;
            &amp;lt;/intent-filter&amp;gt;
        &amp;lt;/activity&amp;gt;

        &amp;lt;activity
          android:name=".MainActivity"
          android:label="@string/app_name"
          android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
          android:windowSoftInputMode="adjustResize"
          android:exported="true"
        /&amp;gt;

      &amp;lt;activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /&amp;gt;
    &amp;lt;/application&amp;gt;

&amp;lt;/manifest&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now we need to create a SplashActivity.java file in &lt;code&gt;android/app/src/main/java/com/{YourProjectName}&lt;/code&gt;. This file will feed into the &lt;code&gt;MainActivity.java&lt;/code&gt; file, and it should look like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.belongmobile; // make sure this is your package name

import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class SplashActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
        finish();
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;At this stage, if everything is set up correctly, you should see the splash screen on your emulator (again, you may have to erase state on the emulator and boot it from scratch). But! It has a white flash! If you haven’t already, you need to run &lt;code&gt;yarn add react-native-splash-screen&lt;/code&gt; in your project’s directory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;MainActivity.java&lt;/code&gt;, add the following imports &lt;code&gt;import org.devio.rn.splashscreen.SplashScreen; import android.os.Bundle;&lt;/code&gt;. Now add the following statement to the top of the MainActivity class:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
    protected void onCreate(Bundle savedInstanceState) {
        SplashScreen.show(this);
        super.onCreate(savedInstanceState);
    }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If you haven’t already, you need to configure App.js (or whatever the root of your project is) by adding this import statement &lt;code&gt;import SplashScreen from ‘react-native-splash-screen';&lt;/code&gt;, and import useEffect on the same line you import React, so &lt;code&gt;import React, {useEffect} from 'react';&lt;/code&gt; and the following function outside of your return statement:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; useEffect(() =&amp;gt; {
    SplashScreen.hide();
  }, []);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now you need to create &lt;code&gt;launch_screen.xml&lt;/code&gt; in &lt;code&gt;android/app/src/main/res/layout&lt;/code&gt;. Add the following code to it:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;

&amp;lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/purple"
    android:gravity="center"&amp;gt;
    &amp;lt;ImageView
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_marginTop="24dp"
        android:src="@mipmap/icon"
    /&amp;gt;
&amp;lt;/LinearLayout&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And now everything should be working!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Baby's First Hash Encryption</title>
      <dc:creator>kirsty-simmonds</dc:creator>
      <pubDate>Fri, 29 May 2020 15:03:01 +0000</pubDate>
      <link>https://dev.to/kirstysimmonds/baby-s-first-hash-encryption-3ihe</link>
      <guid>https://dev.to/kirstysimmonds/baby-s-first-hash-encryption-3ihe</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;I didn't know anything about encryption when I started writing this&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I didn't know anything about security, really. I probably should have, but I didn't. Lots of interesting people with part-shaved, multi-coloured hair on Twitter know about security and they're super smart and cool but I never understand what they're talking about and merely look on in awe while they say hackerish sounding things before going back to fixing the styling on my buttons.&lt;/p&gt;

&lt;p&gt;My CTO at work recently asked me to assess how secure the password-handling was in a React Native application written by a third party. I looked at the Login.js component, which contained the relevant logic, and could see that the password wasn't hashed anywhere, but that's about it (I'll get to what hashing means in a sec). I definitely didn't feel qualified to comment on the code from a security standpoint at the time.&lt;/p&gt;

&lt;p&gt;My CTO then followed up with a recommendation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"If you want a fun trip down a rabbit hole, look up md5, sha-1 and bcrypt password hashing. Also why is salting important? And what does Rails use?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✨ So off I went. ✨&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Hash functions, generally&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In order to hash a password, one must use a hash function.&lt;/p&gt;

&lt;p&gt;I'll start with the definition of a hash function first, and then we can break it down together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hash functions are one-way cryptographic functions that accept a message of any length and return as output a fixed-length value to be used for authenticating the original message.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's go through some of these terms and define what they mean.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hash function maps arbitrary-sized input to a fixed-site output through a process known as compression. Unlike typical data compression (i.e. the process that takes place when you package up a .zip file), compression in this case refers to non-invertible data mapping.&lt;/li&gt;
&lt;li&gt;When a function is 'one way' it essentially means that it is nontrivial (a computer science term people use when referring to things that are not simple/easy to perform) to learn anything useful about the input of the function given the output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ideal hash function is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One-way, which we covered a moment ago.&lt;/li&gt;
&lt;li&gt;Collision-resistant, which means that, given an output from a hash, finding another input that produces the same output (this is the part that's called collision) is nontrivial.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A hash function is considered to be weak when it allows for two files to have the same 'digest', or output, because digital fingerprints created with it can be forged, and are therefore cryptographically broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;MD5 hash functions&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;MD5 (or, to use its full name, Message-Digest algorithm 5) algorithms produce 128-bit hash values. It was invented by Ronald L. Rivest of MIT who also invented MD2, MD4 and MD6, which we won't be going into today. You can generate an MD5 hash using &lt;a href="https://www.md5hashgenerator.com/"&gt;this tool&lt;/a&gt;. Note that the output is the same length no matter the size of the input, and that the entire hash changes if you change only a single character in the input.&lt;/p&gt;

&lt;p&gt;MD5 has been proven to be insecure in a number of ways. Firstly, it isn't collision-resistant, and secondly, according to the lovely people at &lt;a href="https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=2ahUKEwiOz6jotNnpAhUUiFwKHbPXBDsQtwIwAHoECAIQAQ&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Db4b8ktEV4Bg&amp;amp;usg=AOvVaw0hG-2m7SKAwzd2TEypPtxh"&gt;Computerphile&lt;/a&gt;, it is fairly straightforward to simply use Google to break the hashes. One can Google a hash and fairly easily find the corresponding input values that were employed to generate it in the first place, which utterly undermines any illusion of security.&lt;/p&gt;

&lt;p&gt;MD5 is now considered broken and no one should be using it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;SHA-1&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;SHA-1 was developed by the National Security Agency (NSA) as part of their Capstone project, which aimed to develop cryptography standards for public and government use. They are 160 bits long, and you can &lt;a href="http://www.sha1-online.com/"&gt;generate one here&lt;/a&gt;. This hash function also produces the same length of output no matter the length of the input, just like MD5.&lt;/p&gt;

&lt;p&gt;SHA-1 is most often used for checking whether a file is unaltered. It does so by producing a hash value before the file is transmitted, and then again once it reaches its destination. The file can only be considered genuine if both hash values are identical.&lt;/p&gt;

&lt;p&gt;SHA-1 hashes date back to 1995 and have been known to be vulnerable since 2005. As of version 56 of Google Chrome, which was released in 2017, the browser has marked all SHA-1-signed certificates as unsafe, and other major browsers followed suit. Researchers from the CWI Institute in Amsterdam and Google generated the first collision in SHA-1 history in 2017, and it is now considered broken too. But SHA-1 (sometimes known as SHA-256) had already been phased out in favour of SHA-2 in early 2016, before Google's discovery, so faith in it was already thin on the ground.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is a salt?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Salts are data added to hash outputs to make them unique even if the input values are identical. Take passwords, for example. In order to hack into somebody's account, attackers can generate a list of common passwords and their corresponding hash values. Comparing the two will eventually reveal the passwords to the attackers if there are matches.&lt;/p&gt;

&lt;p&gt;If a user's password is stored with a unique salt, however, then any pre-computation-based attacks (like the scenario I just described) targeting unsalted password hashes, or targeting an account with a different salt, will not crack the user's password. If the salt is long enough and sufficiently random, it is incredibly unlikely that an attacker will be able to crack the password. Salts are concatenated with a cryptographic hash function, and the resulting output (but not the original password) is stored with the salt in a database.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Bcrypt&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Bcrypt is also a hashing algorithm, but it is different from MD5 and SHA-1, which we explored earlier. You can take it for a spin &lt;a href="https://bcrypt-generator.com/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When you visit the link, note that you have to select a number of rounds. This refers to the computational cost of the function which in turn controls how much time is required to calculate a single bcrypt hash. The higher the cost factor, the more hashing rounds are required. Increasing the number of rounds by one dooubles the necessary time, and the more time it takes, the more difficult it is for hackers to issue a brute-force attack. This configurable cost is one of the reasons why bcrypt is so secure.&lt;/p&gt;

&lt;p&gt;Unlike MD5 and SHA-1, bcrypt requires a salt as part of the hashing process, making it markedly more secure.&lt;/p&gt;

&lt;p&gt;Bcrypt is designed to be expensive to compute, meaning that, even if, hypothetically speaking, it didn't take an extraordinary amount of attempts for an attacker to guess what the input was, there is a very high computational cost to testing each guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What does rails use?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This should come as no surprise: it's bcrypt!&lt;/p&gt;

</description>
      <category>security</category>
    </item>
    <item>
      <title>How I Got Five Tech Jobs in a Year</title>
      <dc:creator>kirsty-simmonds</dc:creator>
      <pubDate>Tue, 26 May 2020 16:51:31 +0000</pubDate>
      <link>https://dev.to/kirstysimmonds/how-i-got-five-tech-jobs-in-a-year-a6l</link>
      <guid>https://dev.to/kirstysimmonds/how-i-got-five-tech-jobs-in-a-year-a6l</guid>
      <description>&lt;p&gt;In the past 12 months I have technically gotten five jobs in tech:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My first job out of bootcamp which I resigned from almost immediately because I was told some gravely concerning things about the mangement.&lt;/li&gt;
&lt;li&gt;My second, and longest-held (in tech) job. It was in horse tech (lol) and ended in redundancy for myself and a third of the staff.&lt;/li&gt;
&lt;li&gt;A job I got in Berlin that I didn't sign the contract for because I had to return to London due to COVID.&lt;/li&gt;
&lt;li&gt;A job at an international newspaper that I technically got but they couldn't make me an offer due to COVID.&lt;/li&gt;
&lt;li&gt;My current gig at an agency here in London.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have had roughly 120 inital screenings from recruiters, completed 20 technical tests and had approximately ten final-stage interviews which resulted in five offers, cumulatively. Some of these interviews were an absolute disaster. I nearly had a panic attack during a remote pairing interview with a leading ecommerce platform and forgot how to write a for loop, I went blank and forgot every JavaScript array method I knew during an in-person interview in which two people were watching me code (my kryptonite, it turns out), and I once had an hour-long junior-level front-end interview with a dude who banned me from Googling anything (I later learned that this is a magnificent red flag). Performance anxiety issues are very common, but that fact doesn't help in the moment when you know you're crashing, burning and misrepresenting your skills.&lt;/p&gt;

&lt;p&gt;Unfortunately I can't help you with performance anxiety (people have told me that beta blockers help if taken just before the interview), but I can talk a little about the things that helped me to get the job(s), and some patterns I noticed when it comes to assessing whether a company has the potential to be toxic or not, from my own experience.&lt;/p&gt;

&lt;p&gt;These tips are geared towards people at the beginning of their career working in a JavaScript-dominated world (it me).&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I'm glad I did
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Spotting that companies who took my past career(s) seriously were more likely to respect my non-technical skills alongside my technical skills. Lots of companies that I had first-stage talks with treated my work in architecture and journalism like baffling detours before I started learning to code -- The One True Career. In doing so they missed out on my project management and design skills, my ability to work in complex teams, and lots of other things.&lt;/li&gt;
&lt;li&gt;I asked for help on Twitter, and that was both materially helpful and enormously comforting. I had a job-searching tweet go viral the day I was made redundant from my company (I think lots of developers know what it's like to be let go and were therefore happy to help out with an RT) and it put me in touch with two separate employers, both of whom offered me jobs. Neither of them had posted ads for those jobs yet. Additionally, programmers from all over the world got in touch to offer solidarity and send me opportunities. It was absolutely lovely and helped me to feel less terrified at a really challenging time in my life.&lt;/li&gt;
&lt;li&gt;I made some silly side-projects, such as a Command Line Interface (CLI) that outputs some of Wiley's funniest tweets in the terminal, and a theremin with Phil from EastEnders' face on it. I was mostly just embarrassed that I didn't have serious side projects, but they really helped to break the ice in interviews (admittedly they went down a lot less well when I was job-searching in Germany, where those people are less culturally relevant). They either went kind of over peoples' heads (but they appreciated my curiosity for new tech) or they found them funny or interesting and it made the interview a little bit nicer. I wouldn't say this is a mandatory step, but good humour will get you reasonably far and help you to stand out.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Things I wish I did differently
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I ignored my insticts on a couple of occasions (mostly out of desperation -- it's difficult to take proper note of red flags when you absolutely have to get hold of some money immediately) If a company is sloppy getting back to you and disengaged when speaking to you, it's a reasonably good sign that this will continue once you're on the inside. I once had a (man) interviewer ask me whether I'd be able to tolerate the 'boisterous boys' on the team. The answer was no.&lt;/li&gt;
&lt;li&gt;I stretched myself incredibly hard to complete some technicals that depended on three interlocking frameworks that I didn't know, and that the recruiter knew I didn't know. Some of them took hours, and if I hadn't already been made redundant, I have no idea how I would have found the time to complete them around a full-time job. I can't imagine how those with caring responsibilities swing this. It's unfair to lump candidates with incredible amounts of work, and I wish companies were more mindful of the time and effort it takes people who are most likely already in parallel interview pipelines to complete time-intensive tasks. So, I know this is easy for me to say, but interviewees: try not to sweat too hard in the technicals, if you can afford to.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Things I used to study
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I used Jad Joubran's excellent course to get a solid basis in JavaScript. There's an active forum connected to it where you can ask for help, and I don't think I've ever been left waiting longer than a day for a response. &lt;a href="https://learnjavascript.online"&gt;https://learnjavascript.online&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;I practised for my technicals using Code Wars and was surprised by just how much overlap there was between the problems on there and the problems that employers sent me to complete for second-stage interviews. Get into the habit of doing a couple every few days. &lt;a href="https://codewars.com"&gt;https://codewars.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;I remember reading some of the mailouts from Dan Abramov and Maggie Appleton's Just JavaScript course on the way to in-person technicals so I'd be better able to explain high-level JS concepts. It's beautifully illustrated, unique, and free. Now that I have a job I prefer to read them in less feverish circumstances. &lt;a href="https://justjavascript.com"&gt;https://justjavascript.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Udemy! Please don't ever buy a course full price - their sales are frequent and very good. I especially liked the following courses:

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.udemy.com/course/js-algorithms-and-data-structures-masterclass/"&gt;JavaScript Algorithms and Data Structures Masterclass by Colt Steele&lt;/a&gt;. This one is great for doing the slightly scarier (to me) algorithm work that some companies like to throw at interviewees. He teaches code for a living at General Assembly and I can't recommend his courses enough. He's thorough, encouraging and really personable (which matters if you're committing to listening to someone for 20 hours!).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.udemy.com/course/the-advanced-web-developer-bootcamp/"&gt;The Advanced Web Developer Bootcamp&lt;/a&gt;. Another one from Colt Steele, this time a much broader sweep of JavaScript and the fancy and popular frameworks of the day, as well as CSS and SVGs. Don't be too scared off by 'advanced'. While I wouldn't recommend it to someone starting out afresh, the concepts are explained with real clarity and I think, as long as you've spent some time playing with JavaScript and CSS, you could really have fun with this one.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.udemy.com/course/understand-javascript/"&gt;JavaScript: Understanding the Weird Parts by Anthony Alicea&lt;/a&gt;. I'll admit I haven't finished this yet, but it looks great and I look forward to coming back to it when I've settled in with my new job and therefore have some spare time. I'm not afraid to say that I'm flying by the seat of my pants when it comes to JavaScript some days so being able to identify and predict its strange ways is a goal of mine for the next year, and this will help.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.udemy.com/course/the-complete-react-native-and-redux-course/"&gt;The Complete React Native and Hooks Course [2020 Edition] by Stephen Grider&lt;/a&gt;. I just started a job focused on React Native and Rails and I have LOVED working through this course. It's very well-paced and focused on functional components with Hooks. I really like Stephen's approach to teaching, which is to complete tons of smaller projects rather than one big one.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;The Ruby on Rails course on &lt;a href="https://www.learnenough.com/"&gt;Learn Enough&lt;/a&gt; by Michael Hartl. I'll be using Rails at work and I used this to really dig into it after learning it during my bootcamp a year ago. It's definitely worth the money and, as far as I can see, it's the best Rails course out there. And I have been through many of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you found some of this helpful! Feel free to get in touch @torahwilcox on Twitter if you have further questions and I'll do what I can.&lt;/p&gt;

</description>
      <category>jobs</category>
      <category>studying</category>
    </item>
  </channel>
</rss>
