|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.database.DatabaseSecurityOptions
public final class DatabaseSecurityOptions
Defines database security options.
Your SQLite database can use the following database security options:
If the database is encrypted, then it can be opened only on the device where it was originally created. Encrypted databases are not portable between devices. If an application needs to restrict access to the database for its needs only, then it should also protect data with the code signing key. If two applications are signed with the same key that was used during database protection, then both applications have access to the database. This makes it easier to protect a database and restrict its access to friendly applications in the same group.
There is no way to create a non-encrypted database and restrict its usage to only one application. This is because there are other ways (using file I/O operations) to read a plain-text database file from any application.
Constructor Summary | ||
---|---|---|
|
DatabaseSecurityOptions(boolean encrypted)
Creates database security options based on the encrypted property. |
|
|
DatabaseSecurityOptions(int signerId)
Creates database security options for an encrypted and protected database. |
|
|
DatabaseSecurityOptions(CodeSigningKey key)
Creates database security options for an encrypted and protected database. |
Method Summary | ||
---|---|---|
|
CodeSigningKey |
getCodeSigningKey()
Returns the code signing key for encrypted and protected databases. |
|
boolean |
isEncrypted()
Returns the encrypted database property. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseSecurityOptions(boolean encrypted)
encrypted
- If true
then the database file is encrypted and not
portable.public DatabaseSecurityOptions(int signerId)
signerId
- Numeric ID for the code signer. This ID can be accessed from
CodeSigningKey.getSignerId()
.public DatabaseSecurityOptions(CodeSigningKey key)
key
- The code signing key for this database.Method Detail |
---|
public boolean isEncrypted()
true
if the database is encrypted; false
otherwise.public CodeSigningKey getCodeSigningKey()
null
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal