diff options
Diffstat (limited to 'Swiften/StringCodecs')
| -rw-r--r-- | Swiften/StringCodecs/PBKDF2.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Swiften/StringCodecs/PBKDF2.h b/Swiften/StringCodecs/PBKDF2.h index c02c0da..dddad6f 100644 --- a/Swiften/StringCodecs/PBKDF2.h +++ b/Swiften/StringCodecs/PBKDF2.h | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2013 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <Swiften/Base/API.h> | ||
| 9 | #include <Swiften/Base/SafeByteArray.h> | 10 | #include <Swiften/Base/SafeByteArray.h> |
| 10 | #include <Swiften/Base/Concat.h> | 11 | #include <Swiften/Base/Concat.h> |
| 11 | #include <Swiften/Crypto/CryptoProvider.h> | 12 | #include <Swiften/Crypto/CryptoProvider.h> |
| 12 | 13 | ||
| 13 | namespace Swift { | 14 | namespace Swift { |
| 14 | class PBKDF2 { | 15 | class SWIFTEN_API PBKDF2 { |
| 15 | public: | 16 | public: |
| 16 | static ByteArray encode(const SafeByteArray& password, const ByteArray& salt, int iterations, CryptoProvider* crypto) { | 17 | static ByteArray encode(const SafeByteArray& password, const ByteArray& salt, int iterations, CryptoProvider* crypto) { |
| 17 | ByteArray u = crypto->getHMACSHA1(password, concat(salt, createByteArray("\0\0\0\1", 4))); | 18 | ByteArray u = crypto->getHMACSHA1(password, concat(salt, createByteArray("\0\0\0\1", 4))); |
Swift