primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?php
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Crypt\Exception;
/**
* Interface defining all crypt package exceptions
*
* @since 2.0.0
*/
interface CryptExceptionInterface extends \Throwable
{
}

View File

@ -0,0 +1,19 @@
<?php
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Crypt\Exception;
/**
* Exception representing an error decrypting data
*
* @since 2.0.0
*/
class DecryptionException extends \RuntimeException implements CryptExceptionInterface
{
}

View File

@ -0,0 +1,19 @@
<?php
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Crypt\Exception;
/**
* Exception representing an error encrypting data
*
* @since 2.0.0
*/
class EncryptionException extends \RuntimeException implements CryptExceptionInterface
{
}

View File

@ -0,0 +1,19 @@
<?php
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Crypt\Exception;
/**
* Exception representing an error generating an encryption key
*
* @since 2.0.0
*/
class InvalidKeyException extends \RuntimeException implements CryptExceptionInterface
{
}

View File

@ -0,0 +1,31 @@
<?php
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Crypt\Exception;
/**
* Exception representing an invalid Joomla\Crypt\Key type for a cipher
*
* @since 1.4.0
*/
class InvalidKeyTypeException extends \InvalidArgumentException implements CryptExceptionInterface
{
/**
* InvalidKeyTypeException constructor.
*
* @param string $expectedKeyType The expected key type.
* @param string $actualKeyType The actual key type.
*
* @since 1.4.0
*/
public function __construct($expectedKeyType, $actualKeyType)
{
parent::__construct("Invalid key of type: $actualKeyType. Expected $expectedKeyType.");
}
}

View File

@ -0,0 +1,30 @@
<?php
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Crypt\Exception;
/**
* Exception representing an error encrypting data
*
* @since 2.0.0
*/
class UnsupportedCipherException extends \LogicException implements CryptExceptionInterface
{
/**
* UnsupportedCipherException constructor.
*
* @param string $class The class name of the unsupported cipher.
*
* @since 2.0.0
*/
public function __construct(string $class)
{
parent::__construct("The '$class' cipher is not supported in this environment.");
}
}