src/Encrypter.php
public function withKey(string $key): EncrypterInterface
    {
        $encrypter = clone $this;
        try {
            $encrypter->key = Key::loadFromAsciiSafeString($key);
        } catch (CryptoException $e) {
            throw new EncrypterException($e->getMessage(), $e->getCode(), $e);
        }

        return $encrypter;
    }
public function withKey(string $key): EncrypterInterface
    {
        $encrypter = clone $this;
        try {
            $encrypter->key = Key::loadFromAsciiSafeString($key);
        } catch (CryptoException $e) {
            throw new EncrypterException($e->getMessage(), $e->getCode(), $e);
        }

        return $encrypter;
    }
{@inheritdoc}