src/Security/Encryption.php
public static function generateEncryptionKey($cipher)
    {
        if ($cipher === static::SUPPORTED_CIPHER_32) {
            return random_bytes(static::SUPPORTED_CIPHER_32_LENGTH);
        }

        if ($cipher === static::SUPPORTED_CIPHER_16) {
            return random_bytes(static::SUPPORTED_CIPHER_16_LENGTH);
        }
    }
public static function generateEncryptionKey($cipher)
    {
        if ($cipher === static::SUPPORTED_CIPHER_32) {
            return random_bytes(static::SUPPORTED_CIPHER_32_LENGTH);
        }

        if ($cipher === static::SUPPORTED_CIPHER_16) {
            return random_bytes(static::SUPPORTED_CIPHER_16_LENGTH);
        }
    }
public static function generateEncryptionKey ( $ cipher ) { if ( $ cipher === static :: SUPPORTED_CIPHER_32 ) { return random_bytes ( static :: SUPPORTED_CIPHER_32_LENGTH ) ; } if ( $ cipher === static :: SUPPORTED_CIPHER_16 ) { return random_bytes ( static :: SUPPORTED_CIPHER_16_LENGTH ) ; } }
Generate encryption key.

@param $cipher

@throws \Exception

@return string
Generate encryption key .