feat: Add initial backend server with user authentication, session management, and playlist CRUD functionality.

This commit is contained in:
Michael committed 2025-12-06 01:51:07 +01:00
1 parent a1ce183cd3
commit ac4f274031
19 files changed
+1324 -75

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import 'dart:convert';
import 'package:crypto/crypto.dart';
class PasswordHasher {
/// Hash a password using SHA256 (simple implementation)
/// Note: In production, use a proper bcrypt implementation
static String hash(String password) {
final bytes = utf8.encode(password);
final digest = sha256.convert(bytes);
return digest.toString();
}
/// Verify a password against a hash
static bool verify(String password, String hash) {
return PasswordHasher.hash(password) == hash;
}
}