Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

EncryptedPrivateKeyInfo Class Reference

List of all members.


Detailed Description

.intel.drl.spec_ref

Public Member Functions

 EncryptedPrivateKeyInfo (byte[] encoded) throws IOException
 .intel.drl.spec_ref
 EncryptedPrivateKeyInfo (String encrAlgName, byte[] encryptedData) throws NoSuchAlgorithmException
 .intel.drl.spec_ref
 EncryptedPrivateKeyInfo (AlgorithmParameters algParams, byte[] encryptedData) throws NoSuchAlgorithmException
 .intel.drl.spec_ref
String getAlgName ()
 .intel.drl.spec_ref
AlgorithmParameters getAlgParameters ()
 .intel.drl.spec_ref
byte[] getEncryptedData ()
 .intel.drl.spec_ref
PKCS8EncodedKeySpec getKeySpec (Cipher cipher) throws InvalidKeySpecException
 .intel.drl.spec_ref
PKCS8EncodedKeySpec getKeySpec (Key decryptKey) throws NoSuchAlgorithmException, InvalidKeyException
 .intel.drl.spec_ref
PKCS8EncodedKeySpec getKeySpec (Key decryptKey, String providerName) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException
 .intel.drl.spec_ref
PKCS8EncodedKeySpec getKeySpec (Key decryptKey, Provider provider) throws NoSuchAlgorithmException, InvalidKeyException
 .intel.drl.spec_ref
byte[] getEncoded () throws IOException
 .intel.drl.spec_ref

Private Member Functions

boolean mapAlgName ()

Static Private Member Functions

static boolean isNullValue (byte[] toCheck)

Private Attributes

String algName
final AlgorithmParameters algParameters
final byte[] encryptedData
String oid
volatile byte[] encoded

Static Private Attributes

static final byte[] nullParam = new byte[] { 5, 0 }
static final ASN1Sequence asn1
static final ASN1SetOf ASN1Attributes = new ASN1SetOf(ASN1Any.getInstance())
static final ASN1Sequence ASN1PrivateKeyInfo

Constructor & Destructor Documentation

EncryptedPrivateKeyInfo ( byte[]  encoded  )  throws IOException

.intel.drl.spec_ref

EncryptedPrivateKeyInfo ( String  encrAlgName,
byte[]  encryptedData 
) throws NoSuchAlgorithmException

.intel.drl.spec_ref

EncryptedPrivateKeyInfo ( AlgorithmParameters  algParams,
byte[]  encryptedData 
) throws NoSuchAlgorithmException

.intel.drl.spec_ref


Member Function Documentation

static boolean isNullValue ( byte[]  toCheck  )  [static, private]

String getAlgName (  ) 

.intel.drl.spec_ref

AlgorithmParameters getAlgParameters (  ) 

.intel.drl.spec_ref

byte [] getEncryptedData (  ) 

.intel.drl.spec_ref

PKCS8EncodedKeySpec getKeySpec ( Cipher  cipher  )  throws InvalidKeySpecException

.intel.drl.spec_ref

PKCS8EncodedKeySpec getKeySpec ( Key  decryptKey  )  throws NoSuchAlgorithmException, InvalidKeyException

.intel.drl.spec_ref

PKCS8EncodedKeySpec getKeySpec ( Key  decryptKey,
String  providerName 
) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException

.intel.drl.spec_ref

PKCS8EncodedKeySpec getKeySpec ( Key  decryptKey,
Provider  provider 
) throws NoSuchAlgorithmException, InvalidKeyException

.intel.drl.spec_ref

byte [] getEncoded (  )  throws IOException

.intel.drl.spec_ref

boolean mapAlgName (  )  [private]


Member Data Documentation

String algName [private]

final byte [] encryptedData [private]

String oid [private]

volatile byte [] encoded [private]

final byte [] nullParam = new byte[] { 5, 0 } [static, private]

final ASN1Sequence asn1 [static, private]

Initial value:

 new ASN1Sequence(new ASN1Type[] {
            AlgorithmIdentifier.ASN1, ASN1OctetString.getInstance() }) {

                @Override
                protected void getValues(Object object, Object[] values) {
        
                    EncryptedPrivateKeyInfo epki = (EncryptedPrivateKeyInfo) object;
        
                    try {
                        byte[] algParmsEncoded = (epki.algParameters == null) ? nullParam
                                : epki.algParameters.getEncoded();
                        values[0] = new AlgorithmIdentifier(epki.oid, algParmsEncoded);
                        values[1] = epki.encryptedData;
                    } catch (IOException e) {
                        throw new RuntimeException(e.getMessage());
                    }
                }
    }

final ASN1SetOf ASN1Attributes = new ASN1SetOf(ASN1Any.getInstance()) [static, private]

final ASN1Sequence ASN1PrivateKeyInfo [static, private]

Initial value:

 new ASN1Sequence(
            new ASN1Type[] { ASN1Integer.getInstance(), AlgorithmIdentifier.ASN1,
                    ASN1OctetString.getInstance(),
                    new ASN1Implicit(0, ASN1Attributes) }) {
        {
            setOptional(3); 
        }
    }