const bcrypt = require('bcryptjs');

// Test the school login credentials
const testPassword = 'password123';
const hashedPassword = '$2a$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi';

console.log('Testing password:', testPassword);
console.log('Hashed password:', hashedPassword);

bcrypt.compare(testPassword, hashedPassword).then(result => {
  console.log('Password match:', result);
}).catch(err => {
  console.error('Error:', err);
});

// Test base64 encoding
const encoded = Buffer.from(testPassword).toString('base64');
console.log('Base64 encoded:', encoded);

const decoded = Buffer.from(encoded, 'base64').toString('utf-8');
console.log('Decoded:', decoded);