|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.certificate.x509.X509PublicKeyHashKeyStoreIndex
public class X509PublicKeyHashKeyStoreIndex
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.
Field Summary | ||
---|---|---|
|
static long |
ID
The ID representing this index in the key store. |
Constructor Summary | ||
---|---|---|
|
X509PublicKeyHashKeyStoreIndex()
Creates a public key hash index for the key store based on a SHA1 Digest. |
|
|
X509PublicKeyHashKeyStoreIndex(Digest digest)
Creates a public key hash index for the key store based on the specified digest algorithm. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long ID
Constructor Detail |
---|
public X509PublicKeyHashKeyStoreIndex()
public X509PublicKeyHashKeyStoreIndex(Digest digest)
digest
- The specified digest algorithm to use for hashing.Method Detail |
---|
public void addToIndex(KeyStoreData data, KeyStoreDataMap dataMap)
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.
addToIndex
in interface KeyStoreIndex
data
- The KeyStoreData object containing the certificate.dataMap
- The data map where the link is added.public int getHash(Object target)
getHash
in interface KeyStoreIndex
target
- The object to generate the hash on. Must be a byte array.
IllegalArgumentException
- if the specified target parameter is not a byte array.public boolean matches(KeyStoreData data, Object target)
matches
in interface KeyStoreIndex
data
- The key store data to compare against the target.target
- A byte array containing a public key hash to compare against the data.
public long getID()
getID
in interface KeyStoreIndex
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.