public class CapiKeyFormatter
extends java.lang.Object
CryptImportKey function. It is
not intended for use outside of the Toolkit.| Modifier and Type | Field and Description |
|---|---|
static int |
FORMAT_DSA
Format for a private DSA signing key
|
static int |
FORMAT_RSA_DECRYPTION
Format for a private RSA decryption key
|
static int |
FORMAT_RSA_SIGNING
Format for a private RSA signing key
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
formatKey(byte[] rawKey,
int encodingType)
Formats the given key in a way that can be used with the CAPI function
CryptImportKey |
public static final int FORMAT_RSA_DECRYPTION
public static final int FORMAT_RSA_SIGNING
public static final int FORMAT_DSA
public static byte[] formatKey(byte[] rawKey,
int encodingType)
throws java.security.InvalidKeyException
CryptImportKeyrawKey - An ASN.1 encoded private keyencodingType - Key type, FORMAT_RSA_ENCRYPTION, FORMAT_RSA_SIGNING,
or FORMAT_DSA.java.security.InvalidKeyException - if the type specified by encodingType is not valid.CryptKey.importKey(com.entrust.toolkit.capi.CryptProvider, byte[], com.entrust.toolkit.capi.CryptKey, int)