equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * Validation methods for WEP keys |
|
16 * |
|
17 */ |
|
18 |
|
19 /* |
|
20 * %version: tr1cfwln#4 % |
|
21 */ |
|
22 |
|
23 #ifndef WEPKEYVALIDATOR_H |
|
24 #define WEPKEYVALIDATOR_H |
|
25 |
|
26 /*! |
|
27 * @addtogroup group_wep_key_validator |
|
28 * @{ |
|
29 */ |
|
30 |
|
31 class WepKeyValidator |
|
32 { |
|
33 public: |
|
34 enum KeyStatus |
|
35 { |
|
36 KeyStatusOk, |
|
37 KeyStatusIllegalCharacters, |
|
38 KeyStatusWepInvalidLength, |
|
39 }; |
|
40 |
|
41 |
|
42 static const int WepHex64BitMaxLength = 10; |
|
43 static const int WepHex128BitMaxLength = 26; |
|
44 static const int WepAscii64BitMaxLength = 5; |
|
45 static const int WepAscii128BitMaxLength = 13; |
|
46 static const int WepKeyEmptyString = 0; |
|
47 |
|
48 public: |
|
49 static KeyStatus validateWepKey(const QString &key); |
|
50 static KeyStatus isAscii(const QString &key); |
|
51 static KeyStatus isHex(const QString &key); |
|
52 }; |
|
53 |
|
54 /*! @} */ |
|
55 |
|
56 #endif /* WEPKEYVALIDATOR_H */ |
|