diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:09:04 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:09:04 +0000 |
commit | 393f1b414746a7f1977971dd7659dd2b47092b11 (patch) | |
tree | 81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/crypt.cpp | |
parent | c259f95bd0e58b247940a339bb9b4b401b4e9438 (diff) | |
parent | 7e25a863325dc3e9762397e700030969e093b087 (diff) | |
download | libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2 libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip |
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically
update your projects.
Diffstat (limited to '')
-rw-r--r-- | src/crypt.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crypt.cpp b/src/crypt.cpp index ae04353..eb87479 100644 --- a/src/crypt.cpp +++ b/src/crypt.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2010 Xagasoft, All rights reserved. | 2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. |
3 | * | 3 | * |
4 | * This file is part of the libbu++ library and is released under the | 4 | * This file is part of the libbu++ library and is released under the |
5 | * terms of the license contained in the file LICENSE. | 5 | * terms of the license contained in the file LICENSE. |
@@ -11,14 +11,14 @@ | |||
11 | #include "bu/membuf.h" | 11 | #include "bu/membuf.h" |
12 | #include "bu/file.h" | 12 | #include "bu/file.h" |
13 | 13 | ||
14 | Bu::FString Bu::cryptPass( const Bu::FString &sPass, const Bu::FString &sSalt ) | 14 | Bu::String Bu::cryptPass( const Bu::String &sPass, const Bu::String &sSalt ) |
15 | { | 15 | { |
16 | Bu::Md5 md5; | 16 | Bu::Md5 md5; |
17 | Bu::MemBuf mbOut; | 17 | Bu::MemBuf mbOut; |
18 | Bu::Base64 b64Out( mbOut ); | 18 | Bu::Base64 b64Out( mbOut ); |
19 | 19 | ||
20 | Bu::FString::const_iterator i = sSalt.find('$'); | 20 | Bu::String::const_iterator i = sSalt.find('$'); |
21 | Bu::FString sSaltSml = sSalt.getSubStr( sSalt.begin(), i ); | 21 | Bu::String sSaltSml = sSalt.getSubStr( sSalt.begin(), i ); |
22 | 22 | ||
23 | md5.addData( sPass ); | 23 | md5.addData( sPass ); |
24 | md5.addData( sSaltSml ); | 24 | md5.addData( sSaltSml ); |
@@ -29,7 +29,7 @@ Bu::FString Bu::cryptPass( const Bu::FString &sPass, const Bu::FString &sSalt ) | |||
29 | return sSaltSml + "$" + mbOut.getString(); | 29 | return sSaltSml + "$" + mbOut.getString(); |
30 | } | 30 | } |
31 | 31 | ||
32 | Bu::FString Bu::cryptPass( const Bu::FString &sPass ) | 32 | Bu::String Bu::cryptPass( const Bu::String &sPass ) |
33 | { | 33 | { |
34 | Bu::MemBuf mbSalt; | 34 | Bu::MemBuf mbSalt; |
35 | Bu::Base64 b64Salt( mbSalt ); | 35 | Bu::Base64 b64Salt( mbSalt ); |