securitysettings/cpwlansecurityuiplugins/cpwepui/src/wepkeyvalidator.cpp
branchGCC_SURGE
changeset 40 60f08993dad0
parent 39 fe6b6762fccd
equal deleted inserted replaced
29:77618ad58aba 40:60f08993dad0
     1 /*
     1 /*
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of the License "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8  *
     8  *
     9  * Initial Contributors:
     9  * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    15  *    Validation methods for WEP keys
    15  *    Validation methods for WEP keys
    16  *
    16  *
    17  */
    17  */
    18 
    18 
    19 /*
    19 /*
    20  * %version: 1 %
    20  * %version: tr1cfwln#5 %
    21  */
    21  */
    22 
    22 
    23 #include <QString>
    23 #include <QString>
    24 #include <QDebug>
    24 #include <QDebug>
    25 #include "wepkeyvalidator.h"
    25 #include "wepkeyvalidator.h"
    74     }
    74     }
    75     // ASCII
    75     // ASCII
    76     else if (length == WepAscii64BitMaxLength || length == WepAscii128BitMaxLength) {
    76     else if (length == WepAscii64BitMaxLength || length == WepAscii128BitMaxLength) {
    77         ret = isAscii(key);
    77         ret = isAscii(key);
    78     }
    78     }
    79     
    79 
    80     else if (length == WepKeyEmptyString) {
       
    81        ret =  KeyStatusOk ;  
       
    82     }
       
    83     
       
    84     else {
    80     else {
    85         ret = KeyStatusWepInvalidLength;
    81         ret = KeyStatusWepInvalidLength;
    86     }
    82     }
    87 
    83 
    88     return ret;
    84     return ret;