securitysettings/cpwlansecurityuiplugins/cpwpaui/inc/wpakeyvalidator.h
branchGCC_SURGE
changeset 40 60f08993dad0
parent 29 77618ad58aba
parent 39 fe6b6762fccd
equal deleted inserted replaced
29:77618ad58aba 40:60f08993dad0
     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 the License "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  *   WLAN Wizard Utilities
       
    16  *
       
    17  */
       
    18 
       
    19 /*
       
    20  * %version: 1 %
       
    21  */
       
    22 
       
    23 #ifndef WPAKEYVALIDATOR_H
       
    24 #define WPAKEYVALIDATOR_H
       
    25 
       
    26 /*!
       
    27  * @addtogroup group_wpa_key_validator
       
    28  * @{
       
    29  */
       
    30 
       
    31 class WpaKeyValidator
       
    32 {
       
    33 public:
       
    34     enum KeyStatus
       
    35     {
       
    36         KeyStatusOk,
       
    37         KeyStatusIllegalCharacters,
       
    38         KeyStatusWpaTooShort,
       
    39         KeyStatusWpaTooLong
       
    40     };
       
    41 
       
    42     static const int WpaMaxLenght = 64;
       
    43     static const int WpaMinLenght = 8;
       
    44     
       
    45 public:
       
    46 
       
    47     static KeyStatus validateWpaKey(const QString &key);
       
    48     static KeyStatus isAscii(const QString &key);
       
    49     static KeyStatus isHex(const QString &key);
       
    50 };
       
    51 
       
    52 /*! @} */
       
    53 
       
    54 #endif /* WPAKEYVALIDATOR_H */