public function getKey($name)
{
if (strlen($name) === 0) {
throw new SecurityException('Required name argument was empty', 1334215378);
}
$keyPathAndFilename = $this->getKeyPathAndFilename($name);
if (!file_exists($keyPathAndFilename)) {
throw new SecurityException(sprintf('The key "%s" does not exist.', $keyPathAndFilename), 1305812921);
}
$key = Utility\Files::getFileContents($keyPathAndFilename);
if ($key === false) {
throw new SecurityException(sprintf('The key "%s" could not be read.', $keyPathAndFilename), 1334483163);
}
if (strlen($key) === 0) {
throw new SecurityException(sprintf('The key "%s" is empty.', $keyPathAndFilename), 1334483165);
}
return $key;
}