Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 16
Registered: ‎09-12-2008
My Device: Not Specified

error when attempting to store a KEY into RIMKeyStore

When attempting to store a KEY into a new RIMKeyStore, I recieve the following error
NoSuchAlgorithmException

 

What could this mean ?
I am using Classes like, DSAKeyPair, DSACryptoSystem ?
Does this mean I require access to the certicom crypto API ?

 

Anyhow below is more info regarding the error, this occurs in both the
- simulator
- my blackberry device (8100 Pearl) 
   => v 4.5.x (OS)
   => v 3.8.5.32a (crypto kernerl)

Below is the source code

------------------------------------------------------------------------------------------------------------------------------------
try {

 RIMKeyStore ks = new RIMKeyStore("My Keystore");
    
 DSAKeyPair keyPair =  new DSAKeyPair( new DSACryptoSystem() );
      
 AssociatedData associatedData =
 new AssociatedData(AssociatedData.EMAIL,
 "myemail@mycompany.com".getBytes() );

 ks.set( new AssociatedData[] {associatedData},
 "Crypto Signing Key", keyPair.getDSAPrivateKey(), keyPair.getDSAPrivateKey().getAlgorithm(),
 KeyStore.SECURITY_LEVEL_HIGH, null);

 

} catch (Exception e) {
}