omadrm/drmlicensemanager/src/LMSecurity.cpp
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     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:  Encryption/Decryption support functions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <e32std.h>
       
    21 #include <e32base.h>
       
    22 #include <e32math.h>
       
    23 #include <s32buf.h>
       
    24 #include <s32crypt.h>
       
    25 
       
    26 #include "LMSecurity.h"
       
    27 #include "LMSecurityEncrypt.h"
       
    28 #include "LMSecurityDecrypt.h"
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS ===============================
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CLMSecurity::NewEncryptL
       
    34 // Return a new encryptor
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CSecurityEncryptBase* CLMSecurity::NewEncryptL(
       
    38     const TDesC8& init) const
       
    39     {
       
    40     return new CLMSecurityEncrypt(init);
       
    41     };
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CLMSecurity::NewDecryptL
       
    45 // Return a new decryptor
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CSecurityDecryptBase* CLMSecurity::NewDecryptL(
       
    49     const TDesC8& init) const
       
    50     {
       
    51     return new CLMSecurityDecrypt(init);
       
    52     };
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CLMSecurity::SetL
       
    56 // Password functions not supported (handled via the encrypt/decrypt classes)
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 void CLMSecurity::SetL(
       
    60     const TDesC& /* aOldPassword */,
       
    61     const TDesC& /* aNewPassword */)
       
    62     {
       
    63     };
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CLMSecurity::SecurityData
       
    67 // Password functions not supported (handled via the encrypt/decrypt classes)
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 TPtrC8 CLMSecurity::SecurityData() const
       
    71     {
       
    72     return TPtrC8(0, 0);
       
    73     };
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // CLMSecurity::PrepareL
       
    77 // Password functions not supported (handled via the encrypt/decrypt classes)
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 void CLMSecurity::PrepareL(
       
    81     const TDesC& /* aPassword */)
       
    82     {
       
    83     };
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 // CLMSecurity::IsEnabled
       
    87 // Password functions not supported (handled via the encrypt/decrypt classes)
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 TInt CLMSecurity::IsEnabled() const
       
    91     {
       
    92     return ETrue;
       
    93     };
       
    94 
       
    95 // -----------------------------------------------------------------------------
       
    96 // CLMSecurity::SetEnabledL
       
    97 // Password functions not supported (handled via the encrypt/decrypt classes)
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 void CLMSecurity::SetEnabledL(
       
   101     const TDesC& /* aPassword */,
       
   102     TBool /* aIsEnabled */)
       
   103     {
       
   104     };