Initial commit of ld-sysinfo-server backend

This commit is contained in:
2025-09-19 02:09:05 +00:00
commit c0349c106b
1760 changed files with 216243 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
public class BcryptTest {
public static void main(String[] args) {
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(12); // 🔹 Make sure this matches DB cost
String plainTextPassword = "testpassword";
String storedHash = "$2a$12$KcgrvENUeElvUiIVocp6LuJjrTXuKIG8nMbbca/8O.uQ6IdG0X7cO"; // Use latest hash
boolean matches = passwordEncoder.matches(plainTextPassword, storedHash);
System.out.println("✅ Password Matches: " + matches);
}
}

View File

@@ -0,0 +1,11 @@
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
public class GenerateBcryptHash {
public static void main(String[] args) {
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(12);
String plainTextPassword = "testpassword";
String bcryptHash = passwordEncoder.encode(plainTextPassword);
System.out.println("🔹 New BCrypt Hash: " + bcryptHash);
}
}