com.ibm.opencard.signature
Interface MFCKeyConverter
- All Known Implementing Classes:
- MFC40KeyConverter
- public abstract interface MFCKeyConverter
Create MFC specific byte streams for key files.
- Version:
- $Id: MFCKeyConverter.java,v 1.1 1999/12/02 16:06:09 damke Exp $
|
Method Summary |
void |
assertSupportsKey(java.security.PrivateKey key)
Check if the card can store a private Key of the provided type |
void |
assertSupportsKey(java.security.PublicKey key)
Check if the card can store a public Key of the provided type |
byte[] |
pkaFile(java.security.PrivateKey key,
byte[] keyInfo)
Returns the actual key in KeyData format specified for PKA files |
byte[] |
pkaFile(java.security.PublicKey key,
byte[] keyInfo)
Returns the actual key in KeyData format specified for PKA files |
java.security.PublicKey |
readPublicKey(MFCKeyInfo ki,
byte[] fileContent)
Construct a key from the key file content of an MFC key file
Creates a subclass of java.security.PublicKey. |
assertSupportsKey
public void assertSupportsKey(java.security.PrivateKey key)
throws java.security.InvalidKeyException
- Check if the card can store a private Key of the provided type
- Throws:
- java.security.InvalidKeyException - The card does not support the kind of key provided.
assertSupportsKey
public void assertSupportsKey(java.security.PublicKey key)
throws java.security.InvalidKeyException
- Check if the card can store a public Key of the provided type
- Throws:
- java.security.InvalidKeyException - The card does not support the kind of key provided.
pkaFile
public byte[] pkaFile(java.security.PrivateKey key,
byte[] keyInfo)
throws java.security.InvalidKeyException
- Returns the actual key in KeyData format specified for PKA files
- Parameters:
keyInfo - Additional key info to be merged into actual key to
make it a valid PKA file.- Returns:
- Byte array in a form as specified for a full-fledged PKA file
- Throws:
- java.security.InvalidKeyException - The card does not support the kind of key provided
pkaFile
public byte[] pkaFile(java.security.PublicKey key,
byte[] keyInfo)
throws java.security.InvalidKeyException
- Returns the actual key in KeyData format specified for PKA files
- Parameters:
keyInfo - Additional key info to be merged into actual key to
make it a valid PKA file.- Returns:
- Byte array in a form as specified for a full-fledged PKA file
- Throws:
- java.security.InvalidKeyException - The card does not support the kind of key provided
readPublicKey
public java.security.PublicKey readPublicKey(MFCKeyInfo ki,
byte[] fileContent)
throws CardServiceException
- Construct a key from the key file content of an MFC key file
Creates a subclass of java.security.PublicKey.
- Throws:
- CardServiceException - The card service can not interpret the fileContent.
|