summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StringCodecs/PBKDF2.cpp')
m---------Swiften0
-rw-r--r--Swiften/StringCodecs/PBKDF2.cpp20
2 files changed, 0 insertions, 20 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/StringCodecs/PBKDF2.cpp b/Swiften/StringCodecs/PBKDF2.cpp
deleted file mode 100644
index c09c10e..0000000
--- a/Swiften/StringCodecs/PBKDF2.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "Swiften/StringCodecs/PBKDF2.h"
-#include "Swiften/StringCodecs/HMACSHA1.h"
-
-namespace Swift {
-
-ByteArray PBKDF2::encode(const ByteArray& password, const ByteArray& salt, int iterations) {
- ByteArray u = HMACSHA1::getResult(password, salt + ByteArray("\0\0\0\1", 4));
- ByteArray result = u;
- int i = 1;
- while (i < iterations) {
- u = HMACSHA1::getResult(password, u);
- for (unsigned int j = 0; j < u.getSize(); ++j) {
- result[j] ^= u[j];
- }
- ++i;
- }
- return result;
-}
-
-}