Back to CryptoCipher class

Method isSupported

public static bool
isSupported
()
Check if the cipher is supported in this environment.
Returns
  • bool
Since
  • 4.0.0
Class: CryptoCipher
Project: Joomla

Method isSupported - Source code

/**
 * Check if the cipher is supported in this environment.
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
public static function isSupported() : bool
{
    try {
        \Crypto::RuntimeTest();
        return true;
    } catch (\CryptoTestFailedException $e) {
        return false;
    }
}