|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Sunil Pilani (spilani
gmx.net)
Date: Wed Jul 23 2008 - 14:53:27 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Can somebody please help me solve this problem:
1. I have generated a key pair on the host application.
2. I have a KeyBuilder instance in the constructor of the interface implementation(JCRmi) on JC-environment(cref/jcwde)
3. Now, I want to export the P,G,Q,X to the applet to initialize the private key
The problem lies in the step 3, when I call remote method to set a parameter, the reference to the DSAPrivateKey dsaPrivKey is null. I have tried to call this reference in helper method. There too, it is null.
private DSAPrivateKey dsaPrivKey;
public EncryptImp() {
// TODO Auto-generated constructor stub
privKey = new byte[336];
p = new byte[128];
g = new byte[128];
q = new byte[21];
x = new byte[21];
try {
/* create a Keybuilder */
dsaPrivKey = (DSAPrivateKey) KeyBuilder.buildKey(
KeyBuilder.TYPE_DSA_PRIVATE, KeyBuilder.LENGTH_DSA_1024,
false);
...
public short setP(byte[] pParam, short offset) throws RemoteException {
...
try {
dsaPrivKey.setP(p, (short) 0, (short) p.length);/* throws
NullPointerException */
} catch (CryptoException ex) {
ex.getReason();
return P_NOT_SET;
}
...
Greetings,
Linus
_______________________________________________
Muscle mailing list
Muscle
lists.musclecard.com
http://lists.drizzle.com/mailman/listinfo/muscle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]