|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.system.CodeSigningKey
public final class CodeSigningKey
Provides access to code signing keys to facilitate run-time access checking.
PersistentObject controlledStore = PersistentStore.getPersistentObject(PERSISTENT_STORE_DEMO_CONTROLLED_ID); synchronized(controlledStore) { CodeSigningKey codeSigningKey = CodeSigningKey.get( CodeModuleManager.getModuleHandle( "PersistentStoreDemo" ), "ACME" ); controlledStore.setContents( new ControlledAccess(new Vector(), codeSigningKey)); PersistentObject.commit(controlledStore); }Please see “Persistent Store Demo” in the BlackBerry JDE samples folder for more information.
Field Summary | ||
---|---|---|
static int |
RBB_SIGNER_ID
ID for the RIM BlackBerry signing authority. |
|
static int |
RCC_SIGNER_ID
ID for the RIM Crypto Certicom signing authority. |
|
static int |
RCR_SIGNER_ID
ID for the RIM Crypto Runtime signing authority. |
|
static int |
RRT_SIGNER_ID
ID for the RIM Runtime signing authority. |
Constructor Summary | ||
---|---|---|
CodeSigningKey(int signerId,
byte[] publicKey,
String description)
Creates new CodeSigningKey instance. |
||
CodeSigningKey(String signerId,
byte[] publicKey,
String description)
Creates new CodeSigningKey instance. |
Method Summary | ||
---|---|---|
static String |
convert(int i)
Retrieves string form of integer ID. |
|
static int |
convert(String s)
Retrieves integer form of string ID. |
|
boolean |
equals(Object obj)
Determines whether provided object is equivalent to this code signing key. |
|
static CodeSigningKey |
get(int moduleHandle,
int signerId)
Retrieves code signing information associated with numeric signer ID. |
|
static CodeSigningKey |
get(int moduleHandle,
String signerId)
Retrieves code signing information associated with numeric signer ID. |
|
static CodeSigningKey |
get(Object obj)
Retrieves code signing information for provided object. |
|
String |
getDescription()
Retrieves description of Signing Authority. |
|
byte[] |
getPublicKey()
Retrieves public key. |
|
String |
getSignerId()
Retrieves signer's ID. |
|
int |
getSignerIdAsInt()
Retrieves signer's ID as integer. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RRT_SIGNER_ID
public static final int RCC_SIGNER_ID
public static final int RCR_SIGNER_ID
public static final int RBB_SIGNER_ID
Constructor Detail |
---|
public CodeSigningKey(String signerId, byte[] publicKey, String description)
signerId
- ID of the Signing Authority (typically this is the
filename of the key file). Note that this argument must not exceed four
characters in length, otherwise an IllegalArgumentException
will be thrown.publicKey
- Public key data.description
- Description or name of the Signing Authority.public CodeSigningKey(int signerId, byte[] publicKey, String description)
signerId
- ID of the Signing Authority (you can find this value by
looking at the properties of the key file). Note that this argument must not exceed four
characters in length, otherwise an IllegalArgumentException
will be thrown.publicKey
- Public key data.description
- Description or name of the Signing Authority.Method Detail |
---|
public String getSignerId()
public int getSignerIdAsInt()
public byte[] getPublicKey()
public String getDescription()
public boolean equals(Object obj)
Use this method to test whether a provided object is equal to this code signing key. This is true if and only if the signer IDs match, the public keys match, and the descriptions match.
equals
in class Object
obj
- Object to test against this one for equality.
Boolean.hashCode()
,
Hashtable
public static CodeSigningKey get(Object obj)
obj
- Object for which to retrieve the code signing information.
public static CodeSigningKey get(int moduleHandle, int signerId)
moduleHandle
- Handle to the code module containing the key information.signerID
- ID for code signer.
public static CodeSigningKey get(int moduleHandle, String signerId)
moduleHandle
- Handle to the code module containing the key information.signerID
- ID for code signer.
public static int convert(String s)
s
- String form of a signer ID. Note that this argument must not exceed four
characters in length, or be null, otherwise an IllegalArgumentException
will be thrown.
IllegalArgumentException
- Thrown if the specified ID is greater
than four characters in length or if the value is null.public static String convert(int i)
i
- Integer form of a signer ID.
|
|||||||||
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