|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.cardon.cryptoapi.CAPIPrivateKey
public class CAPIPrivateKey
Constructor Summary | |
---|---|
CAPIPrivateKey(CAPICertificate cert,
char[] password)
Creates a new instance of CAPIPrivateKey, with the given Certificate Context handle, and no flag. |
|
CAPIPrivateKey(CAPICertificate cert,
int dwFlags,
char[] password)
Creates a new instance of CAPIPrivateKey, with the given Certificate Context handle, and the given flags. |
Method Summary | |
---|---|
CAPIHash |
createHash(int alg)
Create hash with the given algorithm |
int |
dwKeySpec()
|
void |
finalize()
|
java.lang.String |
getPasswordEncoding()
Returns the encoding used to convert char[] password to byte. |
int |
hCryptProv()
|
void |
setPasswordEncoding(java.lang.String encoding)
Set the encoding used to convert char[] password to byte. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CAPIPrivateKey(CAPICertificate cert, int dwFlags, char[] password) throws CryptoAPIException
WARNING !
The password should be null. This is the default case. The CSP (cryptographic service provider) will display a window (PIN, or other) to the user if needed.
You can also give a password (PIN) programatically. The CSP MUST support the function CryptoAPI function CryptSetProvParam with PP_SIGNATURE_PIN or PP_KEYEXCHANGE_PIN. Most CSP like the Microsoft Basic CSP or the Belgian eid middleware doesn't support this function. The CSP from 'Nexus Personal' has been tested with that. All CSP supporting Smard Card Windows logon should support this function.
.The password doesn't support Unicode (CryptoAPI use byte[], not char[]). In the future, we will create a property to choose the encoding for password.
CryptoAPIException
- if the CryptSetProvParam function is not supported
for PIN (PINNotSupportedException), or other error.public CAPIPrivateKey(CAPICertificate cert, char[] password) throws CryptoAPIException
WARNING !
The password should be null. This is the default case. The CSP (cryptographic service provider) will display a window (PIN, or other) to the user if needed.
You can also give a password (PIN) programatically. The CSP MUST support the function CryptoAPI function CryptSetProvParam with PP_SIGNATURE_PIN or PP_KEYEXCHANGE_PIN. Most CSP like the Microsoft Basic CSP or the Belgian eid middleware doesn't support this function. The CSP from 'Nexus Personal' has been tested with that. All CSP supporting Smard Card Windows logon should support this function.
.The password doesn't support Unicode (CryptoAPI use byte[], not char[]). In the future, we will create a property to choose the encoding for password.
CryptoAPIException
- if the CryptSetProvParam function is not supported
for PIN (PINNotSupportedException), or other error.Method Detail |
---|
public CAPIHash createHash(int alg) throws CryptoAPIException
CryptoAPIException
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public int hCryptProv()
public int dwKeySpec()
public java.lang.String getPasswordEncoding()
public void setPasswordEncoding(java.lang.String encoding)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |