diff --git a/core/lib/Drupal/Component/Utility/Settings.php b/core/lib/Drupal/Component/Utility/Settings.php
index eb59e66..c48ad94 100644
--- a/core/lib/Drupal/Component/Utility/Settings.php
+++ b/core/lib/Drupal/Component/Utility/Settings.php
@@ -78,4 +78,22 @@ public function getAll() {
     return $this->storage;
   }
 
+  /**
+   * Gets a salt useful for hardening against SQL injection.
+   *
+   * @return string
+   *   A salt based on information in settings.php, not in the database.
+   *
+   * @throws \RuntimeException
+   */
+  public function getHashSalt() {
+    $hash_salt = $this->get('hash_salt');
+    // This should never happen, as it breaks user logins and many other services.
+    // Therefore, explicitly notify the user (developer) by throwing an exception.
+    if (empty($hash_salt)) {
+      throw new \RuntimeException('Missing $settings[\'hash_salt\'] in settings.php.');
+    }
+    return $hash_salt;
+  }
+
 }
diff --git a/core/tests/Drupal/Tests/Component/Utility/SettingsTest.php b/core/tests/Drupal/Tests/Component/Utility/SettingsTest.php
index 7117bcb..d3fcf62 100644
--- a/core/tests/Drupal/Tests/Component/Utility/SettingsTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/SettingsTest.php
@@ -13,7 +13,9 @@
 /**
  * Tests read only settings.
  *
- * @see \Drupal\Component\Utility\Settings
+ * @group Drupal
+ *
+ * @coversDefaultClass \Drupal\Component\Utility\Settings
  */
 class SettingsTest extends UnitTestCase {
 
@@ -31,6 +33,9 @@ class SettingsTest extends UnitTestCase {
    */
   protected $settings;
 
+  /**
+   * {@inheritdoc}
+   */
   public static function getInfo() {
     return array(
       'name' => 'Read-only settings test',
@@ -40,12 +45,13 @@ public static function getInfo() {
   }
 
   /**
-   * Setup a basic configuration array.
+   * {@inheritdoc}
    */
   public function setUp(){
     $this->config = array(
       'one' => '1',
       'two' => '2',
+      'hash_salt' => $this->randomName(),
     );
 
     $this->settings = new Settings($this->config);
@@ -56,7 +62,7 @@ public function setUp(){
    */
   public function testGet() {
     // Test stored settings.
-    $this->assertEquals($this->config['one'], $this->settings->get('one'), 'The correect setting was not returned.');
+    $this->assertEquals($this->config['one'], $this->settings->get('one'), 'The correct setting was not returned.');
     $this->assertEquals($this->config['two'], $this->settings->get('two'), 'The correct setting was not returned.');
 
     // Test setting that isn't stored with default.
@@ -79,4 +85,54 @@ public function testGetSingleton() {
     $this->assertEquals($singleton, $this->settings);
   }
 
+  /**
+   * Tests Settings::getHashSalt();
+   *
+   * @covers ::getHashSalt
+   */
+  public function testGetHashSalt() {
+    $this->assertSame($this->config['hash_salt'], $this->settings->getHashSalt());
+  }
+
+  /**
+   * Tests Settings::getHashSalt() with no hash salt value.
+   *
+   * @covers ::getHashSalt
+   *
+   * @dataProvider providerTestGetHashSaltEmpty
+   *
+   * @expectedException \RuntimeException
+   */
+  public function testGetHashSaltEmpty(array $config) {
+    // Re-create settings with no 'hash_salt' key.
+    $settings = new Settings($config);
+    $settings->getHashSalt();
+  }
+
+  /**
+   * Data provider for testGetHashSaltEmpty.
+   *
+   * @return array
+   */
+  public function providerTestGetHashSaltEmpty() {
+    return array(
+      array(array()),
+      array(array('hash_salt' => '')),
+      array(array('hash_salt' => NULL)),
+    );
+  }
+
+  /**
+   * Tests Settings::getHashSalt() with an empty hash salt value.
+   *
+   * @covers ::getHashSalt
+   *
+   * @expectedException \RuntimeException
+   */
+  public function testGetHashSaltWithEmptySalt() {
+    // Re-create settings with no 'hash_salt' key.
+    $settings = new Settings(array('hash_salt' => ''));
+    $settings->getHashSalt();
+  }
+
 }
