securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/wpakeyvalidator.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
child 55 9c2aa05919d9
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
     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 WPA/WPA2 & WPA2 only keys
       
    16  *
       
    17  */
       
    18 
       
    19 /*
       
    20  * %version: tr1cfwln#3 %
       
    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 */