Location:
e32base.h
Link against: euser.lib
CSecurityBase
Supported from 5.0
A base class defining the interface to the security model.
This class, together with the derived class,
CBoundedSecurityBase
, defines a set of pure virtual functions
which must be implemented by a class derived from
CBoundedSecurityBase
.
The interface defines:
factory functions for constructing an encryption handler and a decryption handler.
functions for password handling.
a function for accessing security data.
|
Defined in CSecurityBase
:
IsEnabled()
, NewDecryptL()
, NewEncryptL()
, PrepareL()
, SecurityData()
, SetEnabledL()
, SetL()
Inherited from CBase
:
operator new()
virtual CSecurityEncryptBase* NewEncryptL(const TDesC8& aInit) const = 0;
A factory function for constructing an encryption handling
object. An encryption handling object is one which implements the interface
defined by the CSecurityEncryptBase
abstract class.
As a minimum, this function should construct and return a
pointer to an object suitably derived from
CSecurityEncryptBase
.
|
|
virtual CSecurityDecryptBase* NewDecryptL(const TDesC8& aInit) const = 0;
A factory function for constructing a decryption handling
object. A decryption handling object is one which implements the interface
defined by the CSecurityDecryptBase
abstract class.
As a minimum, this function should construct and return a
pointer to an object suitably derived from
CSecurityDecryptBase
.
|
|
virtual TInt IsEnabled() const = 0;
Determines whether password checking is enabled. The function
implements the behaviour required of a call to
Password::IsEnabled()
.
A derived class must provide a concrete implementation for this function. It should return a true or false value based on whether password checking has been enabled or not.
|
virtual void SetEnabledL(const TDesC& aPassword,TBool aIsEnabled) = 0;
Sets the password enabled state. The function implements the
behaviour required of a call to Password::SetEnabled()
.
A derived class must provide a concrete implementation for this
function. It should set the password checking enabled state, i.e. password
checking is enabled or disabled according to the value of
aIsEnabled
. The password aPassword
should be the
currently valid password.
|
virtual void PrepareL(const TDesC& aPassword) = 0;
Validates the specified password. The function implements the
behaviour required of a call to Password::IsValid()
.
A derived class must provide a concrete implementation for this function. As a minimum, the password should be checked to ensure that it is the currently valid password. If the password is invalid, then the function must leave.
The function can also be used to prepare for decryption by making a decryption key from the password. The meaning of this is entirely dependent on the encryption scheme.
|
virtual void SetL(const TDesC& aOldPassword,const TDesC& aNewPassword);
Changes the password. The function implements the behaviour required of
a call to Password::Set()
.
A derived class must provide a concrete implementation for this
function. As a minimum, the function should replace the existing password
aOldPassword
with the a new password aNewPassword
. If
the existing password is invalid, then the function must leave.
|
virtual TPtrC8 SecurityData() const = 0;
Gives access to security data.
A derived class must provide a concrete implementation for this function. It should provide access to security data through a descriptor pointer. The meaning applied to security data depends on the security model.
|