Upload current code with PSK generator
This commit is contained in:
parent
504ef2211d
commit
72c525f364
4 changed files with 31 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue