Upload current code with PSK generator

This commit is contained in:
zontreck 2024-05-15 13:44:54 -07:00
parent 504ef2211d
commit 72c525f364
4 changed files with 31 additions and 3 deletions

View file

@ -52,11 +52,19 @@ class Settings {
Future<String> hashPSK(String PSK) async {
String hash = Hashing.md5Hash("AriasCreations");
for (int i = 0; i < 512; i++) {
for (int i = 0; i < 8192; i++) {
hash = Hashing.sha256Hash("${hash}:${PSK}");
}
hash = Hashing.md5Hash(hash);
hash = Hashing.sha256Hash(hash);
return hash;
}
Future<String> createClientPSK(String hashedPSK) async {
String hash = Hashing.sha256Hash("AriasCreations");
for (int i = 0; i < 8192; i++) {
hash = Hashing.sha256Hash("${hash}:${hashedPSK}");
}
return Hashing.sha256Hash(hash);
}
}