TASN1DecDSAKeyPair Class Reference

#include <x509keys.h>

class TASN1DecDSAKeyPair
Public Member Functions
IMPORT_C voidDecodeDERL(const TDesC8 &, TInt &, CDSAPublicKey *&, CDSAPrivateKey *&)

Detailed Description

Class for decoding DSA key pairs from ASN.1 DER encoding.

Since
v8.0

Member Function Documentation

DecodeDERL ( const TDesC8 &, TInt &, CDSAPublicKey *&, CDSAPrivateKey *& )

IMPORT_C voidDecodeDERL(const TDesC8 &aDER,
TInt &aPos,
CDSAPublicKey *&aPublicKey,
CDSAPrivateKey *&aPrivateKey
)

Decodes a DSA key pair from a buffer containing an ASN.1 DER-encoded private key.

The encoding of the private key contains public key components as well.

The DER encoding has the following format:
	 *     SEQUENCE-OF
     *         INTEGER version (==0, ignored)
	 *         INTEGER p (public prime)
	 *         INTEGER q (160-bit public subprime, q | p-1)
	 *         INTEGER g (public generator of subgroup)
	 *         INTEGER x (private key)
	 *         INTEGER y (public key y=g^x)
	 * 

ParameterDescription
aDERDER-encoded private key.
aPosPosition in the buffer to start decoding (updated on exit).
aPublicKeyOn return, the DSA public key object
aPrivateKeyOn return, the DSA private key object