Help Center
Local Navigation
- Creating user interfaces
- Storing data
- Creating connections
- Managing applications
- Using custom messages and folders in the message list
- Applications for push content
- Localizing BlackBerry device applications
- Controlling access to APIs and application data
- Check if a code signature is required
- Java APIs with controlled access
- Register to use controlled APIs
- Restrictions on code signatures
- Request a code signature
- Register a signature key using a proxy server
- Sign an application using a proxy server
- View the signature status for an application
- Using keys to protect APIs and data
- Protect APIs using code signing keys
- Protect runtime store data using code signing keys
- Protect persistent data using code signing keys
- Testing a BlackBerry device application
- Packaging and distributing a BlackBerry Java Application
- Glossary
- Provide feedback
- Legal notice
BlackBerry Manuals & Help
>
Documentation for Developers
>
Java Development Guides and API Reference
>
Development Guide - BlackBerry Java Development Environment - 4.7.0
Protect runtime store data using code signing keys
- Import the following classes:
- Create a hash ID for the object you want to store in the runtime store.
long MY_DATA_ID = 0x33abf322367f9018L; Hashtable myHashtable = new Hashtable();
-
Store the object in the runtime store and protect the object with the CodeSigningKey object. Only applications signed with the key can read or change the object.
RuntimeStore.put( MY_DATA_ID, new ControlledAccess( myHashtable, key ) );
- Make sure that the object is protected with a particular code signing key, invoke RuntimeStore.get, providing as parameters the hash ID for the object and the CodeSigningKey object.
Parent topic: Controlling access to APIs and application data