private function generarId()
    {
        if (function_exists('random_bytes')) {
            $semilla = random_bytes(32);
        } elseif (function_exists('mcrypt_create_iv')) {
            $semilla = mcrypt_create_iv(32, MCRYPT_DEV_URANDOM);
        } elseif (function_exists('openssl_random_pseudo_bytes')) {
            $semilla = openssl_random_pseudo_bytes(32);
        } else {
            $semilla = uniqid('armazon', true);
        }

        return hash('sha256', $semilla);
    }