Class EAC2CVCertificateGenerator
				
				
			
				Class implementing a generator for CV certificates according to EAC 1.1 and EAC 2.0 specifications.
				
				
					
Defined in:  EAC2CVCertificateGenerator.js.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| 
							 
								EAC2CVCertificateGenerator(crypto)
							 
							Define a generator object for CV certificates 
						 | 
					
| Method Attributes | Method Name and Description | 
|---|---|
| <static> | 
								 EAC2CVCertificateGenerator.decodeUncompressedECPoint(uncompressedPoint)
								 
								Decode x/y coordinates from uncompressed format 
							 | 
						
| <static> | 
								 EAC2CVCertificateGenerator.dtos(d)
								 
								Convert date to string with format YYMMDD. 
							 | 
						
| <static> | 
								 EAC2CVCertificateGenerator.encodeUncompressedECPoint(x, y)
								 
								Convert x/y coordinates to uncompressed format 
							 | 
						
| 
								 generateCVCertificate(signingKey, taOID)
								 
								Generate a certificate based on the parameter set using the setter methods. 
							 | 
						|
| 
								 setCAR(CAR, CAR, CAR)
								 
								Set the certification authority reference 
							 | 
						|
| 
								 setChatAuthorizationLevel(authLevel)
								 
								Set the authorization level of the authorization template for the generated certificate 
							 | 
						|
| 
								 setChatOID(oid)
								 
								Set the object identifier of the authorization template for the generated certificate 
							 | 
						|
| 
								 setCHR(CHR, CHR, CHR)
								 
								Set the certificate holder reference 
							 | 
						|
| 
								 setEffectiveDate(effectiveDate, effectiveDate)
								 
								Set the effective date 
							 | 
						|
| 
								 setExpiryDate(expiryDate, expiryDate)
								 
								Set the expiry date 
							 | 
						|
| 
								 setExtensions(extensions)
								 
								Set some additional extensions 
							 | 
						|
| 
								 setIncludeDomainParameters(value)
								 
								Set whether to include domain parameters in the certificate or not 
							 | 
						|
| 
								 setProfileIdentifier(profileID)
								 
								Set the profile identifier 
							 | 
						|
| 
								 setPublicKey(publicKey)
								 
								Set the public key to be included in the certificate 
							 | 
						|
| 
								
								 Set the algorithm identifier for terminal authentication 
							 | 
						|
| 
								 stripLeadingZeros(value)
								 
								Strips leading zeros of a ByteString 
							 | 
						
					Class Detail
				
				
				
						EAC2CVCertificateGenerator(crypto)
				
				
				
					Define a generator object for CV certificates
					
				
				
				
				
				
					
						- Parameters:
 - {Crypto} crypto
 - the crypto provider to be used
 
					Method Detail
				
				
					 
					<static> 
					
					{ByteString}
					EAC2CVCertificateGenerator.decodeUncompressedECPoint(uncompressedPoint)
					
					
					
						Decode x/y coordinates from uncompressed format
						
						
					
					
					
					
						
							- Parameters:
 - {ByteString} uncompressedPoint
 - the uncompressed point
 
- Returns:
 - the x-/y-coordinate of the point
 
<static> 
					
					{String}
					EAC2CVCertificateGenerator.dtos(d)
					
					
					
						Convert date to string with format YYMMDD.
						
						
					
					
					
					
						
							- Parameters:
 - {Date} d
 - the date object.
 
- Returns:
 - the date/time string.
 
<static> 
					
					{ByteString}
					EAC2CVCertificateGenerator.encodeUncompressedECPoint(x, y)
					
					
					
						Convert x/y coordinates to uncompressed format
						
						
					
					
					
					
						
							- Parameters:
 - {ByteString} x
 - the x-coordinate of the point
 - {ByteString} y
 - the y-coordinate of the point
 
- Returns:
 - the point in uncompressed format
 
					
					{CVC}
					generateCVCertificate(signingKey, taOID)
					
					
					
						Generate a certificate based on the parameter set using the setter methods.
						
						
					
					
					
					
						
							- Parameters:
 - {Key} signingKey
 - the key to be used for signing the certificate
 - {ByteString} taOID
 - the object identifier associated with the signing key
 
- Returns:
 - the CVC certificate
 
					
					
					setCAR(CAR, CAR, CAR)
					
					
					
						Set the certification authority reference
						
						
					
					
					
					
						
							- Parameters:
 - {String} CAR
 - the CAR value
 - {ByteString} CAR
 - the CAR value
 - {PublicKeyReference} CAR
 - the CAR value
 
					
					
					setChatAuthorizationLevel(authLevel)
					
					
					
						Set the authorization level of the authorization template for the generated certificate
						
						
					
					
					
					
						
							- Parameters:
 - {ByteString} authLevel
 - the encoded authorization level
 
					
					
					setChatOID(oid)
					
					
					
						Set the object identifier of the authorization template for the generated certificate
						
						
					
					
					
					
						
							- Parameters:
 - {ByteString} oid
 - the object identifier for the chat
 
					
					
					setCHR(CHR, CHR, CHR)
					
					
					
						Set the certificate holder reference
						
						
					
					
					
					
						
							- Parameters:
 - {String} CHR
 - the CHR value
 - {ByteString} CHR
 - the CHR value
 - {PublicKeyReference} CHR
 - the CHR value
 
					
					
					setEffectiveDate(effectiveDate, effectiveDate)
					
					
					
						Set the effective date
						
						
					
					
					
					
						
							- Parameters:
 - {String} effectiveDate
 - the effective date in the format YYMMDD
 - {Date} effectiveDate
 - the effective date as Date object
 
					
					
					setExpiryDate(expiryDate, expiryDate)
					
					
					
						Set the expiry date
						
						
					
					
					
					
						
							- Parameters:
 - {String} expiryDate
 - the expiry date in the format YYMMDD
 - {Date} expiryDate
 - the expiry date as Date object
 
					
					
					setExtensions(extensions)
					
					
					
						Set some additional extensions
						
						
					
					
					
					
						
							- Parameters:
 - {Array of ASN.1 objects} extensions
 - array containing the ASN.1 encoded extensions for the certificate
 
					
					
					setIncludeDomainParameters(value)
					
					
					
						Set whether to include domain parameters in the certificate or not
						
						
					
					
					
					
						
							- Parameters:
 - {Boolean} value
 - the flag indicator
 
					
					
					setProfileIdentifier(profileID)
					
					
					
						Set the profile identifier
						
						
					
					
					
					
						
							- Parameters:
 - {Number} profileID
 - the profile identifier
 
					
					
					setPublicKey(publicKey)
					
					
					
						Set the public key to be included in the certificate
						
						
					
					
					
					
						
							- Parameters:
 - {Key} publicKey
 - the public key object to be certified
 
					
					
					setTAAlgorithmIdentifier(oid)
					
					
					
						Set the algorithm identifier for terminal authentication
						
						
					
					
					
					
						
							- Parameters:
 - {ByteString} oid
 - the object identifier as specified in appendix A.6.4
 
					
					{ByteString}
					stripLeadingZeros(value)
					
					
					
						Strips leading zeros of a ByteString
						
						
					
					
					
					
						
							- Parameters:
 - {ByteString} value
 - the ByteString value
 
- Returns:
 - the stripped ByteString object, may be an empty ByteString