CXI
Loading...
Searching...
No Matches
Public Member Functions | List of all members

This class provides methods to create and handle key attribute (property) lists. More...

Public Member Functions

 KeyAttributes ()
 Creates an empty key attribute list.
 
 KeyAttributes (byte[] list, int ofs) throws CryptoServerException
 Creates a key attribute list from the given (serialized) attribute stream. More...
 
 KeyAttributes (byte[] list) throws CryptoServerException
 Creates a key attribute list from the given (serialized) attribute stream. More...
 
KeyAttributes clone ()
 Creates a full copy of the source object. More...
 
byte[] toByteArray () throws CryptoServerException
 Serializes the attribute list and returns an attribute stream. More...
 
void setAlgo (int algo)
 Sets the key algorithm attribute. More...
 
int getAlgo ()
 Returns the key algorithm attribute. More...
 
void setType (int type)
 Sets the key type attribute. More...
 
int getType ()
 Returns the key type attribute (see Key Types).
 
void setSize (int size)
 Sets the key size. More...
 
int getSize ()
 Returns the key size in bits. More...
 
void setExport (int exp)
 Sets the key export attribute. More...
 
int getExport ()
 Returns the key export attribute. More...
 
void setUsage (int usage)
 Sets the key usage attribute. More...
 
int getUsage ()
 Returns the key usage attribute. More...
 
void setLabel (String label) throws CryptoServerException
 Sets the key label attribute. More...
 
String getLabel () throws CryptoServerException
 Returns the key label attribute. More...
 
void setExponent (byte[] exp)
 Sets the public exponent of a RSA key. More...
 
void setExponent (BigInteger exp)
 Sets the public exponent of a RSA key. More...
 
byte[] getExponent ()
 Returns the public exponent of a RSA key. More...
 
void setModulus (byte[] mod)
 Sets the modulus of a RSA key. More...
 
void setModulus (BigInteger mod)
 Sets the modulus of a RSA key. More...
 
byte[] getModulus ()
 Returns the modulus of a RSA key. More...
 
void setParamP (byte[] par)
 Sets the prime value P of a DSA key. More...
 
void setParamP (BigInteger par)
 Sets the prime value P of a DSA key. More...
 
byte[] getParamP ()
 Returns the prime value P of a DSA key. More...
 
void setParamQ (byte[] par)
 Sets the prime value Q of a DSA key. More...
 
void setParamQ (BigInteger par)
 Sets the prime value Q of a DSA key. More...
 
byte[] getParamQ ()
 Returns the prime value Q of a DSA key. More...
 
void setParamG (byte[] par)
 Sets the generator value G of a DSA key. More...
 
void setParamG (BigInteger par)
 Sets the generator value G of a DSA key. More...
 
byte[] getParamG ()
 Returns the generator value G of a DSA key.
 
void setDSAPub (byte[] par)
 Sets the public key part of a DSA key. More...
 
void setDSAPub (BigInteger par)
 Sets the public key part of a DSA key. More...
 
byte[] getDSAPub ()
 Returns the public key part of a DSA key.
 
void setCurve (String name) throws CryptoServerException
 Sets the domain parameter of an ECDSA key. More...
 
void setCurve (byte[] curve)
 Sets the domain parameter of an ECDSA key. More...
 
void setCurve (ECParameterSpec curve) throws CryptoServerException
 Sets the domain parameter for an ECDSA key. More...
 
byte[] getCurve ()
 Returns the domain parameters for a ECDSA key. More...
 
byte[] getCurveEncoded () throws IOException, CryptoServerException
 Returns the domain parameters for a ECDSA key. More...
 
void setECPub (byte[] par)
 Sets the public key part of a ECDSA key. More...
 
void setECPub (BigInteger par)
 Sets the public key part of a ECDSA key. More...
 
byte[] getECPub ()
 Returns the public key part of a ECDSA key. More...
 
void setName (String name) throws CryptoServerException
 Sets the key name attribute. More...
 
String getName () throws CryptoServerException
 Returns the key name. More...
 
void setGroup (String group) throws CryptoServerException
 Sets the key group attribute. More...
 
String getGroup () throws CryptoServerException
 Returns the key group. More...
 
void setSpecifier (int spec)
 Sets the key specifier attribute. More...
 
int getSpecifier ()
 Returns the key specifier. More...
 
void setGenerationDate (Date date)
 Sets the generation date attribute of the key. More...
 
void setGenerationDate (byte[] utcTime)
 Sets the generation date attribute of the key. More...
 
void setExpirationDate (Date date)
 Sets the expiration date attribute of the key. More...
 
void setExpirationDate (byte[] utcTime)
 Sets the expiration date attribute of the key. More...
 
Date getGenerationDate ()
 Returns the generation date attribute or null if the data attribute was not set. More...
 
Date getExpirationDate ()
 Returns the expiration date attribute or null if the data attribute was not set. More...
 
void setCertificate (byte[] cert)
 Sets a certificate for the key. More...
 
byte[] getCertificate ()
 Returns the certificate or null if the key doesn't have a certificate attribute.
 
void setMechs (int[] mechs) throws CryptoServerException, UnsupportedEncodingException
 Sets an int array with mechanisms for a key. More...
 
byte[] getMechs ()
 Returns a list of key mechanisms as byte array. More...
 
void setFIPSUsage (int usage)
 Sets the fips key usage/padding specifier attribute. More...
 
int getFIPSUsage ()
 Returns the fips key usage/padding specifier attribute. More...
 

Detailed Description

This class provides methods to create and handle key attribute (property) lists.

Key attributes contain additional information stored together with the key. Some attributes are mandatory (e.g. algorithm, size), other attributes are optional (e.g. label, certificate). Some attributes are applicable to all keys (e.g. name, usage), other attributes are only used with special keys (e.g. modulus -> RSA key, curve -> ECDA key).