|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Provides class for authentication with HMAC-SHA1 algorithm. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __SRTP_AUTHENTICATION_RCC_H__ |
|
22 #define __SRTP_AUTHENTICATION_RCC_H__ |
|
23 |
|
24 #include "msrtpauthentication.h" |
|
25 |
|
26 class CSrtpAuthentication_RCC : public CBase, public MSRTPAuthentication |
|
27 { |
|
28 public: |
|
29 /** |
|
30 * Constructor. |
|
31 * @leave KErrNone if success, system-wide error code otherwise |
|
32 */ |
|
33 static CSrtpAuthentication_RCC* NewL(); |
|
34 |
|
35 /** |
|
36 * Constructor. |
|
37 * @leave KErrNone if success, system-wide error code otherwise |
|
38 */ |
|
39 static CSrtpAuthentication_RCC* NewLC(); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 ~CSrtpAuthentication_RCC(); |
|
45 |
|
46 /** |
|
47 * This function is called by SRTP for authentication/integrity protection |
|
48 * with the default algorith, RCC. |
|
49 * Produces authentication tag based on input key and data M. |
|
50 * result IS truncated to n_tag leftmost bits |
|
51 * @param aBitLength authentication tag length |
|
52 * @param aKey authentication key (n_a) |
|
53 * @param aAuthPortion data to be integrity protected |
|
54 * Returns HBufC8* authentication tag (n_tag truncated) |
|
55 */ |
|
56 HBufC8* AuthenticateL(TUint aBitLength, |
|
57 const TDesC8& aKey, |
|
58 const TDesC8& aAuthPortion, |
|
59 const TDesC8& aRoc); |
|
60 |
|
61 |
|
62 private: // methods |
|
63 /** |
|
64 * Default constructor. |
|
65 */ |
|
66 CSrtpAuthentication_RCC(); |
|
67 |
|
68 void ConstructL(); |
|
69 }; |
|
70 |
|
71 #endif //__SRTP_AUTHENTICATION_RCC_H__ |
|
72 |