return 'base64:' .
base64_encode($key);
} /**
* Sets the new encryption key in your .env file.
*/
protected function setNewEncryptionKey(string
$key, array
$params): bool
{ $currentKey =
env('encryption.key', ''
);
if ($currentKey !== '' && !
$this->
confirmOverwrite($params)) { // Not yet testable since it requires keyboard input
return false; // @codeCoverageIgnore
} return $this->
writeNewEncryptionKeyToFile($currentKey,
$key);
} /**
* Checks whether to overwrite existing encryption key.
*/
protected function confirmOverwrite(array
$params): bool
{