|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.cardon.cryptoapi.provider.CryptoAPIPrivateKey
public class CryptoAPIPrivateKey
CrypoAPI Private Key
Field Summary | |
---|---|
static java.lang.String |
CryptoAPIKeyFormat
Constant String to indentify a cryptoAPI Key. |
Fields inherited from interface java.security.PrivateKey |
---|
serialVersionUID |
Constructor Summary | |
---|---|
CryptoAPIPrivateKey(CAPICertificate CAPIcert,
char[] password)
Creates a new instance of CryptoAPIPrivateKey WARNING ! |
Method Summary | |
---|---|
java.lang.String |
getAlgorithm()
Returns the standard algorithm name for this key. |
CAPIPrivateKey |
getCAPIPrivateKey()
|
byte[] |
getEncoded()
NOT EXCTRACTIBLE : Returns null. |
java.lang.String |
getFormat()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CryptoAPIKeyFormat
Constructor Detail |
---|
public CryptoAPIPrivateKey(CAPICertificate CAPIcert, 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 java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public CAPIPrivateKey getCAPIPrivateKey()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |