<?php
header('Content-Type: application/json; charset=utf-8');
header('Access-Control-Allow-Origin: *');
require_once __DIR__ . '/../../config.php';
$db = getDB();
$stmt = $db->query("SELECT idusuarios_sist, nombre_usr, passwd FROM usuarios_sist WHERE idusuarios_sist IN (1,2,5) LIMIT 3");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Calcular MD5 de la contraseña candidata
$test = 'Mikel123*';
echo json_encode([
    'usuarios' => $rows,
    'md5_test' => md5($test),
    'test_pass' => $test
], JSON_PRETTY_PRINT);
