net.rim.device.api.crypto.certificate.x509
Class X509PublicKeyHashKeyStoreIndex
java.lang.Object
net.rim.device.api.crypto.certificate.x509.X509PublicKeyHashKeyStoreIndex
- All Implemented Interfaces:
- KeyStoreIndex
public class X509PublicKeyHashKeyStoreIndex
- extends Object
- implements KeyStoreIndex
Provides indexing functionality for Key Stores based upon the
hash of the encoded public key bytes of an X.509 certificate (as
found in the public key field of the raw certificate, without DER tags).
The hash algorithm can be specified.
Note that this index only applies to X.509 certificates.
For more information on using a keystore index, see Using the keystore index. This quick tutorial provides overview
information as well as an example on how to use an index within a keystore.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
|
Field Summary |
|
static long |
ID
The ID representing this index in the key store. |
|
Method Summary |
|
void |
addToIndex(KeyStoreData data,
KeyStoreDataMap dataMap)
Links the KeyStoreData object passed in with a hash of the public key from
an X509 certificate. |
|
int |
getHash(Object target)
Returns a hash representing the target object passed in. |
|
long |
getID()
Returns a unique ID that represents this index within the key store. |
|
boolean |
matches(KeyStoreData data,
Object target)
Determines if the target object ( a byte array containing a public key ) matches the
public key contained within the data object. |
ID
public static final long ID
- The ID representing this index in the key store.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
X509PublicKeyHashKeyStoreIndex
public X509PublicKeyHashKeyStoreIndex()
- Creates a public key hash index for the key store based
on a SHA1 Digest.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
X509PublicKeyHashKeyStoreIndex
public X509PublicKeyHashKeyStoreIndex(Digest digest)
- Creates a public key hash index for the key store based
on the specified digest algorithm.
- Parameters:
digest - The specified digest algorithm to use for hashing.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
addToIndex
public void addToIndex(KeyStoreData data,
KeyStoreDataMap dataMap)
- Links the
KeyStoreData object passed in with a hash of the public key from
an X509 certificate. The dataMap is used by the key store to find
the appropriate records when doing searches based on this index.
- Specified by:
addToIndex in interface KeyStoreIndex
- Parameters:
data - The KeyStoreData object containing the certificate.dataMap - The data map where the link is added.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getHash
public int getHash(Object target)
- Returns a hash representing the target object passed in.
- Specified by:
getHash in interface KeyStoreIndex
- Parameters:
target - The object to generate the hash on. Must be a byte array.
- Returns:
- An integer representing the hash of the target object passed into this method.
- Throws:
IllegalArgumentException - if the specified target parameter is not a byte array.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
matches
public boolean matches(KeyStoreData data,
Object target)
- Determines if the target object ( a byte array containing a public key ) matches the
public key contained within the data object.
- Specified by:
matches in interface KeyStoreIndex
- Parameters:
data - The key store data to compare against the target.target - A byte array containing a public key hash to compare against the data.
- Returns:
- true if the key store data object contains the same public key hash as the target and
false otherwise.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getID
public long getID()
- Returns a unique ID that represents this index within the key store.
- Specified by:
getID in interface KeyStoreIndex
- Returns:
- A long that is associated with the index.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
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