public static loadEncryptionKey ( string $filePath ) : EncryptionKey | ||
$filePath | string | |
return | EncryptionKey |
public static function loadEncryptionKey(string $filePath) : EncryptionKey
{
if (!\is_readable($filePath)) {
throw new Alerts\CannotPerformOperation('Cannot read keyfile: ' . $filePath);
}
return new EncryptionKey(self::loadKeyFile($filePath));
}
/** * SecureJwt constructor. * * @param string $keyFile */ public function __construct($keyFile = '') { $this->key = KeyFactory::loadEncryptionKey($keyFile); }