equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 |
19 |
20 #include <imcvcodc.h> |
20 #include <tconvbase64.h> |
21 #include <e32math.h> |
21 #include <e32math.h> |
22 #include "NSmlAuth.h" |
22 #include "NSmlAuth.h" |
23 #include "nsmlcliagconstants.h" |
23 #include "nsmlcliagconstants.h" |
24 #include "NSmlAgentBase.h" |
24 #include "NSmlAgentBase.h" |
25 #include "nsmlagenttestdefines.h" |
25 #include "nsmlagenttestdefines.h" |
170 { |
170 { |
171 if ( iAuthState == EAuthenticated ) |
171 if ( iAuthState == EAuthenticated ) |
172 { |
172 { |
173 CreateAndSaveNewNonceL(); |
173 CreateAndSaveNewNonceL(); |
174 } |
174 } |
175 TImCodecB64 B64Coder; |
175 TBase64 B64Coder; |
176 delete iB64Nonce; |
176 delete iB64Nonce; |
177 iB64Nonce = NULL; |
177 iB64Nonce = NULL; |
178 iB64Nonce = HBufC8::NewL( iNonce->Length() * 2 + 1 ); |
178 iB64Nonce = HBufC8::NewL( iNonce->Length() * 2 + 1 ); |
179 TPtr8 B64NoncePtr( iB64Nonce->Des() ); |
179 TPtr8 B64NoncePtr( iB64Nonce->Des() ); |
180 User::LeaveIfError( B64Coder.Encode( *iNonce, B64NoncePtr ) ); |
180 User::LeaveIfError( B64Coder.Encode( *iNonce, B64NoncePtr ) ); |
267 TNSmlError::TNSmlSyncMLStatusCode CNSmlAuth::CheckCredentialL() |
267 TNSmlError::TNSmlSyncMLStatusCode CNSmlAuth::CheckCredentialL() |
268 { |
268 { |
269 HBufC8* B64Cred; |
269 HBufC8* B64Cred; |
270 if ( iFormat->Des() != KNSmlAgentBase64Format ) |
270 if ( iFormat->Des() != KNSmlAgentBase64Format ) |
271 { |
271 { |
272 TImCodecB64 B64Coder; |
272 TBase64 B64Coder; |
273 B64Cred = HBufC8::NewLC( iCredential->Length() * 2 + 1 ); |
273 B64Cred = HBufC8::NewLC( iCredential->Length() * 2 + 1 ); |
274 TPtr8 B64CredPtr( B64Cred->Des() ); |
274 TPtr8 B64CredPtr( B64Cred->Des() ); |
275 User::LeaveIfError( B64Coder.Encode( *iCredential, B64CredPtr ) ); |
275 User::LeaveIfError( B64Coder.Encode( *iCredential, B64CredPtr ) ); |
276 } |
276 } |
277 else |
277 else |