ITS
encodeSecurity.cpp File Reference
#include <encodeSecurity.h>
#include <QDataStream>
Include dependency graph for encodeSecurity.cpp:

Go to the source code of this file.

Functions

QByteArray encode_INTEGER (quint64 v, int l)
 encode_INTEGER Encode an unsigned integer. More...
 
QByteArray encode_SINTEGER (quint64 v, int l)
 encode_INTEGER Encode an signed integer. More...
 
QByteArray encode_OCTET_STRING (OCTET_STRING_t o)
 encode_OCTET_STRING Encode an OCTET_STRING. More...
 
QByteArray encode_Opaque (Opaque_t opaque)
 encode_Opaque Encode an Opaque with unknown length. More...
 
QByteArray encode_Opaque (Opaque_t opaque, int length)
 encode_Opaque Encode an Opaque with known length. More...
 
QByteArray encode_INTX (IntX_t intx)
 encode_INTX Encode an INTX. More...
 
QByteArray encode_PublicKeyAlgorithm (PublicKeyAlgorithm_t algorithm)
 encode_PublicKeyAlgorithm Encode a PublicKeyAlgorithm. More...
 
QByteArray encode_SymmetricAlgorithm (SymmetricAlgorithm_t algorithm)
 encode_SymmetricAlgorithm Encode a SymmetricAlgorithm. More...
 
QByteArray encode_PublicKey (PublicKey_t key)
 encode_PublicKey Encode a PublicKey. More...
 
QByteArray encode_EccPoint (EccPoint_t point)
 encode_EccPoint Encode an EccPoint. More...
 
QByteArray encode_EccPointType (EccPointType_t type)
 encode_EccPointType Encode an EccPointType. More...
 
QByteArray encode_EncryptionParameters (EncryptionParameters_t encParams)
 encode_EncryptionParameters Encode an EncryptionParameters. More...
 
QByteArray encode_Signature (Signature_t signature)
 encode_Signature Encode a Signature. More...
 
QByteArray encode_EcdsaSignature (EcdsaSignature_t ecdsa)
 encode_EcdsaSignature Encode an EcdsaSignature. More...
 
QByteArray encode_SignerInfo (SignerInfo_t signerInfo)
 encode_SignerInfo Encode a SignerInfo. More...
 
QByteArray encode_SignerInfoType (SignerInfoType_t type)
 encode_SignerInfoType Encode a SignerInfoType. More...
 
QByteArray encode_HashedId8 (HashedId8_t hash)
 encode_HashedId8 Encode an HashedId8. More...
 
QByteArray encode_HashedId3 (HashedId3_t hash)
 encode_HashedId3 Encode an HashedId3. More...
 
QByteArray encode_Time32 (Time32_t time)
 encode_Time32 Encode a Time32. More...
 
QByteArray encode_Time64 (Time64_t time)
 encode_Time64 Encode a Time64. More...
 
QByteArray encode_Time64WithStandardDeviation (Time64WithStandardDeviation_t time)
 encode_Time64WithStandardDeviation Encode a Time64WithStandardDeviation. More...
 
QByteArray encode_Duration (Duration_t duration)
 encode_Duration Encode a Duration. More...
 
QByteArray encode_TwoDLocation (TwoDLocation_t location)
 encode_TwoDLocation Encode a TwoDLocation. More...
 
QByteArray encode_ThreeDLocation (ThreeDLocation_t location)
 encode_ThreeDLocation Encode a ThreeDLocation. More...
 
QByteArray encode_GeographicRegion (GeographicRegion_t region)
 encode_GeographicRegion Encode a GeographicRegion. More...
 
QByteArray encode_RegionType (RegionType_t type)
 encode_RegionType Encode a RegionType. More...
 
QByteArray encode_CircularRegion (CircularRegion_t region)
 encode_CircularRegion Encode a CircularRegion. More...
 
QByteArray encode_RectangularRegion (RectangularRegion_t region)
 encode_RectangularRegion Encode a RectangularRegion. More...
 
QByteArray encode_PolygonalRegion (PolygonalRegion_t polygon)
 encode_PolygonalRegion Encode a PolygonalRegion. More...
 
QByteArray encode_IdentifiedRegion (IdentifiedRegion_t id)
 encode_IdentifiedRegion Encode a IdentifiedRegion. More...
 
QByteArray encode_RegionDictionary (RegionDictionary_t dictionary)
 encode_RegionDictionary Encode a RegionDictionary. More...
 
QByteArray encode_SecuredHeader (SecuredHeader_t header)
 encode_SecuredHeader Encode a SecuredHeader. More...
 
QByteArray encode_HeaderField (HeaderField_t field)
 encode_HeaderField Encode an HeaderField. More...
 
QByteArray encode_HeaderFieldType (HeaderFieldType_t type)
 encode_HeaderFieldType Encode an HeaderFieldType. More...
 
QByteArray encode_SecureTrailer (SecureTrailer_t trailer)
 encode_SecureTrailer Encode a SecureTrailer. More...
 
QByteArray encode_TrailerField (TrailerField_t field)
 encode_TrailerField Encode a TrailerField. More...
 
QByteArray encode_TrailerFieldType (TrailerFieldType_t type)
 encode_TrailerFieldType Encode a TrailerFieldType. More...
 
QByteArray encode_RecipientInfo (RecipientInfo_t recipient)
 encode_RecipientInfo Encode a RecipientInfo. More...
 
QByteArray encode_EciesEncryptedKey (EciesEncryptedKey_t ecies)
 encode_EciesEncryptedKey Encode an EciesEncryptedKey. More...
 
QByteArray encode_Certificate (Certificate_t certificate)
 encode_Certificate Encode a Certificate. More...
 
QByteArray encode_SubjectInfo (SubjectInfo_t info)
 encode_SubjectInfo Encode a SubjectInfo. More...
 
QByteArray encode_SubjectType (SubjectType_t type)
 encode_SubjectType Encode a SubjectType. More...
 
QByteArray encode_SubjectAttribute (SubjectAttribute_t subject)
 encode_SubjectAttribute Encode a SubjectAttribute. More...
 
QByteArray encode_SubjectAttributeType (SubjectAttributeType_t type)
 encode_SubjectAttributeType Encode SubjectAttributeType. More...
 
QByteArray encode_SubjectAssurance (SubjectAssurance_t subject)
 encode_SubjectAssurance Encode a SubjectAssurance. More...
 
QByteArray encode_ValidityRestriction (ValidityRestriction_t validityRestriction)
 encode_ValidityRestriction Encode a ValidityRestriction. More...
 
QByteArray encode_ValidityRestrictionType (ValidityRestrictionType_t type)
 encode_ValidityRestrictionType Encode a ValidityRestrictionType. More...
 
QByteArray encode_ItsAidSsp (ItsAidSsp_t ssp)
 encode_ItsAidSsp Encode an ItsAidSsp. More...
 

Variables

static quint8 intx_lentghs []
 

Function Documentation

◆ encode_Certificate()

QByteArray encode_Certificate ( Certificate_t  certificate)

encode_Certificate Encode a Certificate.

Parameters
certificateThe Certificate to encode.
Returns
The encoded Certificate.

Definition at line 651 of file encodeSecurity.cpp.

References certificate, encode_INTEGER(), encode_INTX(), encode_Signature(), encode_SignerInfo(), encode_SubjectAttribute(), encode_SubjectInfo(), encode_ValidityRestriction(), Certificate::signature_certificate, Certificate::signer_info_certificate, Certificate::subject_attributes, Certificate::subject_info, Certificate::validity_restrictions, validityRestriction, and Certificate::version.

Referenced by encode_SignerInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_CircularRegion()

QByteArray encode_CircularRegion ( CircularRegion_t  region)

encode_CircularRegion Encode a CircularRegion.

Parameters
regionThe CircularRegion to encode.
Returns
The encoded CircularRegion.

Definition at line 386 of file encodeSecurity.cpp.

References CircularRegion::center, encode_INTEGER(), encode_TwoDLocation(), and CircularRegion::radius.

Referenced by encode_GeographicRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_Duration()

QByteArray encode_Duration ( Duration_t  duration)

encode_Duration Encode a Duration.

Parameters
durationThe Duration to encode.
Returns
The encoded Duration.

Definition at line 307 of file encodeSecurity.cpp.

References encode_INTEGER().

Referenced by encode_ValidityRestriction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_EccPoint()

QByteArray encode_EccPoint ( EccPoint_t  point)

encode_EccPoint Encode an EccPoint.

Parameters
pointThe EccPoint to encode.
Returns
The encoded EccPoint.

Definition at line 140 of file encodeSecurity.cpp.

References EccPoint::ecc_point::choice, EccPoint::ecc_point::EccPoint__ecc_point_u::unknown_ecc_point::data, EccPoint::ecc_point, EccPointType_compressed_lsb_y_0, EccPointType_compressed_lsb_y_1, EccPointType_uncompressed, EccPointType_x_coordinate_only, encode_EccPointType(), encode_Opaque(), EccPoint::type, ValidityRestriction::type, EccPoint::ecc_point::EccPoint__ecc_point_u::uncompressed, EccPoint::ecc_point::EccPoint__ecc_point_u::unknown_ecc_point, EccPoint::x, and EccPoint::ecc_point::EccPoint__ecc_point_u::uncompressed::y.

Referenced by encode_EcdsaSignature(), encode_EciesEncryptedKey(), encode_PublicKey(), and encode_SubjectAttribute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_EccPointType()

QByteArray encode_EccPointType ( EccPointType_t  type)

encode_EccPointType Encode an EccPointType.

Parameters
typeThe EccPointType to encode.
Returns
The encoded EccPointType.

Definition at line 171 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_EccPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_EcdsaSignature()

QByteArray encode_EcdsaSignature ( EcdsaSignature_t  ecdsa)

encode_EcdsaSignature Encode an EcdsaSignature.

Parameters
ecdsaThe EcdsaSignature to encode.
Returns
The encoded EcdsaSignature.

Definition at line 223 of file encodeSecurity.cpp.

References encode_EccPoint(), encode_Opaque(), EcdsaSignature::r, and EcdsaSignature::s.

Referenced by encode_Signature().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_EciesEncryptedKey()

QByteArray encode_EciesEncryptedKey ( EciesEncryptedKey_t  ecies)

encode_EciesEncryptedKey Encode an EciesEncryptedKey.

Parameters
eciesThe EciesEncryptedKey to encode.
Returns
The encoded EciesEncryptedKey.

Definition at line 634 of file encodeSecurity.cpp.

References EciesEncryptedKey::c, encode_EccPoint(), encode_Opaque(), EciesEncryptedKey::t, and EciesEncryptedKey::v.

Referenced by encode_RecipientInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_EncryptionParameters()

◆ encode_GeographicRegion()

QByteArray encode_GeographicRegion ( GeographicRegion_t  region)

encode_GeographicRegion Encode a GeographicRegion.

Parameters
regionThe GeographicRegion to encode.
Returns
The encoded GeographicRegion.

Definition at line 339 of file encodeSecurity.cpp.

References GeographicRegion::geographic_region::choice, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::circle, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::circle::circular_region, encode_CircularRegion(), encode_IdentifiedRegion(), encode_Opaque(), encode_PolygonalRegion(), encode_RectangularRegion(), encode_RegionType(), GeographicRegion::geographic_region, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::id, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::id::id_region, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::unknown_geographic_region::other_region, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::polygon, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::polygon::polygonal_region, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::rectangle, GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::rectangle::rectangular_region, rectangularRegion, GeographicRegion::region_type, RegionType_circle, RegionType_id, RegionType_none, RegionType_polygon, RegionType_rectangle, and GeographicRegion::geographic_region::GeographicRegion__geographic_region_u::unknown_geographic_region.

Referenced by encode_ValidityRestriction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_HashedId3()

QByteArray encode_HashedId3 ( HashedId3_t  hash)

encode_HashedId3 Encode an HashedId3.

Parameters
hashThe HashedId3 to encode.
Returns
The encoded HashedId3.

Definition at line 289 of file encodeSecurity.cpp.

References encode_OCTET_STRING().

Referenced by encode_HeaderField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_HashedId8()

QByteArray encode_HashedId8 ( HashedId8_t  hash)

encode_HashedId8 Encode an HashedId8.

Parameters
hashThe HashedId8 to encode.
Returns
The encoded HashedId8.

Definition at line 288 of file encodeSecurity.cpp.

References encode_OCTET_STRING().

Referenced by encode_RecipientInfo(), and encode_SignerInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_HeaderField()

QByteArray encode_HeaderField ( HeaderField_t  field)

encode_HeaderField Encode an HeaderField.

Parameters
fieldThe HeaderField to encode.
Returns
The encoded HeaderField.

Definition at line 475 of file encodeSecurity.cpp.

References HeaderField::header_field::choice, HeaderField::header_field::HeaderField__header_field_u::request_unrecognized_certificate::digests, HeaderField::header_field::HeaderField__header_field_u::encryption_parameters_header_field::enc_params, encode_EncryptionParameters(), encode_HashedId3(), encode_HeaderFieldType(), encode_INTX(), encode_Opaque(), encode_RecipientInfo(), encode_SignerInfo(), encode_ThreeDLocation(), encode_Time32(), encode_Time64(), encode_Time64WithStandardDeviation(), HeaderField::header_field::HeaderField__header_field_u::encryption_parameters_header_field, HeaderField::header_field::HeaderField__header_field_u::expiration, HeaderField::header_field::HeaderField__header_field_u::expiration::expiry_time, HeaderField::header_field::HeaderField__header_field_u::generation_location, HeaderField::header_field::HeaderField__header_field_u::generation_location::generation_location_value, HeaderField::header_field::HeaderField__header_field_u::generation_time, HeaderField::header_field::HeaderField__header_field_u::generation_time::generation_time_value, HeaderField::header_field::HeaderField__header_field_u::generation_time_with_standard_deviation, HeaderField::header_field::HeaderField__header_field_u::generation_time_with_standard_deviation::generation_time_with_standard_deviation_value, HeaderField::header_field, HeaderFieldType_encryption_parameters, HeaderFieldType_expiration, HeaderFieldType_generation_location, HeaderFieldType_generation_time, HeaderFieldType_generation_time_with_standard_deviation, HeaderFieldType_its_aid, HeaderFieldType_recipient_info, HeaderFieldType_request_unrecognized_certificate, HeaderFieldType_signer_info, HeaderField::header_field::HeaderField__header_field_u::its_aid_header_field, HeaderField::header_field::HeaderField__header_field_u::its_aid_header_field::its_aid_value, HeaderField::header_field::HeaderField__header_field_u::unknown_header_field::other_header, recipient, HeaderField::header_field::HeaderField__header_field_u::recipient_info_header_field, HeaderField::header_field::HeaderField__header_field_u::recipient_info_header_field::recipients, HeaderField::header_field::HeaderField__header_field_u::request_unrecognized_certificate, HeaderField::header_field::HeaderField__header_field_u::signer_info_header_field::signer, HeaderField::header_field::HeaderField__header_field_u::signer_info_header_field, ValidityRestriction::type, HeaderField::type, and HeaderField::header_field::HeaderField__header_field_u::unknown_header_field.

Referenced by encode_SecuredHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_HeaderFieldType()

QByteArray encode_HeaderFieldType ( HeaderFieldType_t  type)

encode_HeaderFieldType Encode an HeaderFieldType.

Parameters
typeThe HeaderFieldType to encode.
Returns
The encoded HeaderFieldType.

Definition at line 557 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_HeaderField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_IdentifiedRegion()

QByteArray encode_IdentifiedRegion ( IdentifiedRegion_t  id)

encode_IdentifiedRegion Encode a IdentifiedRegion.

Parameters
idThe IdentifiedRegion to encode.
Returns
The encoded IdentifiedRegion.

Definition at line 432 of file encodeSecurity.cpp.

References encode_INTEGER(), encode_INTX(), and encode_RegionDictionary().

Referenced by encode_GeographicRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_INTEGER()

QByteArray encode_INTEGER ( quint64  v,
int  l 
)

encode_INTEGER Encode an unsigned integer.

Parameters
vThe value to encode.
lThe length need to encode.
Returns
The encoded unsigned integer.

Definition at line 19 of file encodeSecurity.cpp.

Referenced by encode_Certificate(), encode_CircularRegion(), encode_Duration(), encode_EccPointType(), encode_HeaderFieldType(), encode_IdentifiedRegion(), encode_PublicKeyAlgorithm(), encode_RegionDictionary(), encode_RegionType(), encode_SecuredHeader(), encode_SignerInfoType(), encode_SubjectAttributeType(), encode_SubjectType(), encode_SymmetricAlgorithm(), encode_Time32(), encode_Time64WithStandardDeviation(), encode_TrailerFieldType(), and encode_ValidityRestrictionType().

Here is the caller graph for this function:

◆ encode_INTX()

QByteArray encode_INTX ( IntX_t  intx)

encode_INTX Encode an INTX.

Parameters
intxThe INTX to encode.
Returns
The encoded INTX.

Definition at line 83 of file encodeSecurity.cpp.

References intx, and intx_lentghs.

Referenced by encode_Certificate(), encode_HeaderField(), encode_IdentifiedRegion(), encode_ItsAidSsp(), encode_Opaque(), encode_PolygonalRegion(), encode_SecuredHeader(), encode_SecureTrailer(), encode_SignerInfo(), and encode_SubjectAttribute().

Here is the caller graph for this function:

◆ encode_ItsAidSsp()

QByteArray encode_ItsAidSsp ( ItsAidSsp_t  ssp)

encode_ItsAidSsp Encode an ItsAidSsp.

Parameters
sspThe ItsAidSsp to encode.
Returns
The encoded ItsAidSsp.

Definition at line 821 of file encodeSecurity.cpp.

References encode_INTX(), encode_Opaque(), ItsAidSsp::its_aid_ssp, ItsAidSsp::service_specific_permissions, and ssp.

Referenced by encode_SubjectAttribute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_OCTET_STRING()

QByteArray encode_OCTET_STRING ( OCTET_STRING_t  o)

encode_OCTET_STRING Encode an OCTET_STRING.

Parameters
oThe OCTET_STRING to encode.
Returns
The encoded OCTET_STRING.

Definition at line 45 of file encodeSecurity.cpp.

References OCTET_STRING::buf, and OCTET_STRING::size.

Referenced by encode_HashedId3(), encode_HashedId8(), encode_Opaque(), and encode_Time64().

Here is the caller graph for this function:

◆ encode_Opaque() [1/2]

QByteArray encode_Opaque ( Opaque_t  opaque)

encode_Opaque Encode an Opaque with unknown length.

Parameters
opaqueThe Opaque to encode.
Returns
The encoded Opaque.

Definition at line 56 of file encodeSecurity.cpp.

References encode_INTX(), encode_OCTET_STRING(), Opaque::length, and Opaque::value.

Referenced by encode_EccPoint(), encode_EcdsaSignature(), encode_EciesEncryptedKey(), encode_EncryptionParameters(), encode_GeographicRegion(), encode_HeaderField(), encode_ItsAidSsp(), encode_PublicKey(), encode_RecipientInfo(), encode_Signature(), encode_SignerInfo(), encode_SubjectAssurance(), encode_SubjectAttribute(), encode_SubjectInfo(), encode_ThreeDLocation(), encode_TrailerField(), and encode_ValidityRestriction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_Opaque() [2/2]

QByteArray encode_Opaque ( Opaque_t  opaque,
int  length 
)

encode_Opaque Encode an Opaque with known length.

Parameters
opaqueThe Opaque to encode.
lengthThe Opaque length.
Returns
The encoded Opaque.

Definition at line 70 of file encodeSecurity.cpp.

References encode_OCTET_STRING(), and Opaque::value.

Here is the call graph for this function:

◆ encode_PolygonalRegion()

QByteArray encode_PolygonalRegion ( PolygonalRegion_t  polygon)

encode_PolygonalRegion Encode a PolygonalRegion.

Parameters
polygonThe PolygonalRegion to encode.
Returns
The encoded PolygonalRegion.

Definition at line 414 of file encodeSecurity.cpp.

References encode_INTX(), and encode_TwoDLocation().

Referenced by encode_GeographicRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_PublicKey()

◆ encode_PublicKeyAlgorithm()

QByteArray encode_PublicKeyAlgorithm ( PublicKeyAlgorithm_t  algorithm)

encode_PublicKeyAlgorithm Encode a PublicKeyAlgorithm.

Parameters
algorithmThe PublicKeyAlgorithm to encode.
Returns
The encoded PublicKeyAlgorithm.

Definition at line 106 of file encodeSecurity.cpp.

References encode_INTEGER().

Referenced by encode_PublicKey(), encode_RecipientInfo(), encode_Signature(), and encode_SignerInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_RecipientInfo()

QByteArray encode_RecipientInfo ( RecipientInfo_t  recipient)

◆ encode_RectangularRegion()

QByteArray encode_RectangularRegion ( RectangularRegion_t  region)

encode_RectangularRegion Encode a RectangularRegion.

Parameters
regionThe RectangularRegion to encode.
Returns
The encoded RectangularRegion.

Definition at line 400 of file encodeSecurity.cpp.

References encode_TwoDLocation(), RectangularRegion::northwest, and RectangularRegion::southeast.

Referenced by encode_GeographicRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_RegionDictionary()

QByteArray encode_RegionDictionary ( RegionDictionary_t  dictionary)

encode_RegionDictionary Encode a RegionDictionary.

Parameters
dictionaryThe RegionDictionary to encode.
Returns
The encoded RegionDictionary.

Definition at line 448 of file encodeSecurity.cpp.

References encode_INTEGER().

Referenced by encode_IdentifiedRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_RegionType()

QByteArray encode_RegionType ( RegionType_t  type)

encode_RegionType Encode a RegionType.

Parameters
typeThe RegionType to encode.
Returns
The encoded RegionType.

Definition at line 384 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_GeographicRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SecuredHeader()

QByteArray encode_SecuredHeader ( SecuredHeader_t  header)

encode_SecuredHeader Encode a SecuredHeader.

Parameters
headerThe SecuredHeader to encode.
Returns
The encoded SecuredHeader.

Definition at line 451 of file encodeSecurity.cpp.

References encode_HeaderField(), encode_INTEGER(), encode_INTX(), SecuredHeader::header_fields, and SecuredHeader::protocol_version.

Referenced by SecurityProfile_CAM::secureHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SecureTrailer()

QByteArray encode_SecureTrailer ( SecureTrailer_t  trailer)

encode_SecureTrailer Encode a SecureTrailer.

Parameters
trailerThe SecureTrailer to encode.
Returns
The encoded SecureTrailer.

Definition at line 559 of file encodeSecurity.cpp.

References encode_INTX(), encode_TrailerField(), and SecureTrailer::trailer_fields.

Referenced by SecurityManager::securedTrailer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_Signature()

QByteArray encode_Signature ( Signature_t  signature)

encode_Signature Encode a Signature.

Parameters
signatureThe Signatureto encode.
Returns
The encoded Signature.

Definition at line 198 of file encodeSecurity.cpp.

References Signature::algorithm, Signature::sign::choice, Signature::sign::Signature__sign_u::ecdsa_nistp256_with_sha256_signature, Signature::sign::Signature__sign_u::ecdsa_nistp256_with_sha256_signature::ecdsa_signature, encode_EcdsaSignature(), encode_Opaque(), encode_PublicKeyAlgorithm(), PublicKeyAlgorithm_ecdsa_nistp256_with_sha256, Signature::sign, Signature::sign::Signature__sign_u::unknown_signature::signature, and Signature::sign::Signature__sign_u::unknown_signature.

Referenced by encode_Certificate(), and encode_TrailerField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SignerInfo()

QByteArray encode_SignerInfo ( SignerInfo_t  signerInfo)

encode_SignerInfo Encode a SignerInfo.

Parameters
signerInfoThe SignerInfo to encode.
Returns
The encoded SignerInfo.

Definition at line 237 of file encodeSecurity.cpp.

References SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_digest_with_other_algorithm::algorithm, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate::certif, certificate, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_chain, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_digest_with_other_algorithm, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_digest_with_sha256, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_chain::certificates, SignerInfo::signer_info::choice, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_digest_with_sha256::digest, SignerInfo::signer_info::SignerInfo__signer_info_u::certificate_digest_with_other_algorithm::digest, encode_Certificate(), encode_HashedId8(), encode_INTX(), encode_Opaque(), encode_PublicKeyAlgorithm(), encode_SignerInfoType(), SignerInfo::signer_info::SignerInfo__signer_info_u::unknown_signer_info::info, SignerInfo::signer_info, SignerInfoType_certificate, SignerInfoType_certificate_chain, SignerInfoType_certificate_digest_with_other_algorithm, SignerInfoType_certificate_digest_with_sha256, ValidityRestriction::type, SignerInfo::type, and SignerInfo::signer_info::SignerInfo__signer_info_u::unknown_signer_info.

Referenced by encode_Certificate(), and encode_HeaderField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SignerInfoType()

QByteArray encode_SignerInfoType ( SignerInfoType_t  type)

encode_SignerInfoType Encode a SignerInfoType.

Parameters
typeThe SignerInfoType to encode.
Returns
The encoded SignerInfoType.

Definition at line 287 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_SignerInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SINTEGER()

QByteArray encode_SINTEGER ( quint64  v,
int  l 
)

encode_INTEGER Encode an signed integer.

Parameters
vThe value to encode.
lThe length need to encode.
Returns
The encoded signed integer.

Definition at line 32 of file encodeSecurity.cpp.

Referenced by encode_ThreeDLocation(), and encode_TwoDLocation().

Here is the caller graph for this function:

◆ encode_SubjectAssurance()

QByteArray encode_SubjectAssurance ( SubjectAssurance_t  subject)

encode_SubjectAssurance Encode a SubjectAssurance.

Parameters
subjectThe SubjectAssurance to encode.
Returns
The encoded SubjectAssurance.

Definition at line 773 of file encodeSecurity.cpp.

References encode_Opaque().

Referenced by encode_SubjectAttribute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SubjectAttribute()

QByteArray encode_SubjectAttribute ( SubjectAttribute_t  subject)

encode_SubjectAttribute Encode a SubjectAttribute.

Parameters
subjectThe SubjectAttribute to encode.
Returns
The encoded SubjectAttribute.

Definition at line 709 of file encodeSecurity.cpp.

References SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::assurance_level::assurance, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::assurance_level, SubjectAttribute::subject_attribute::choice, encode_EccPoint(), encode_INTX(), encode_ItsAidSsp(), encode_Opaque(), encode_PublicKey(), encode_SubjectAssurance(), encode_SubjectAttributeType(), SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::encryption_key, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::its_aid_list::its_aid, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::its_aid_list, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::its_aid_ssp_list::its_aid_ssp, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::its_aid_ssp_list, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::encryption_key::key, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::unknown_subject_attribute::other_attribute, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::recontruction_value, SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::recontruction_value::rv, SubjectAttribute::subject_attribute, SubjectAttributeType_assurance_level, SubjectAttributeType_encryption_key, SubjectAttributeType_its_aid_list, SubjectAttributeType_its_aid_ssp_list, SubjectAttributeType_reconstruction_value, SubjectAttributeType_verification_key, ValidityRestriction::type, SubjectAttribute::type, and SubjectAttribute::subject_attribute::SubjectAttribute__subject_attribute_u::unknown_subject_attribute.

Referenced by encode_Certificate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SubjectAttributeType()

QByteArray encode_SubjectAttributeType ( SubjectAttributeType_t  type)

encode_SubjectAttributeType Encode SubjectAttributeType.

Parameters
typeThe SubjectAttributeType to encode.
Returns
The encoded SubjectAttributeType.

Definition at line 772 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_SubjectAttribute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SubjectInfo()

QByteArray encode_SubjectInfo ( SubjectInfo_t  info)

encode_SubjectInfo Encode a SubjectInfo.

Parameters
infoThe SubjectInfo to encode.
Returns
The encoded SubjectInfo.

Definition at line 693 of file encodeSecurity.cpp.

References encode_Opaque(), encode_SubjectType(), SubjectInfo::subject_name, and SubjectInfo::subject_type.

Referenced by encode_Certificate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SubjectType()

QByteArray encode_SubjectType ( SubjectType_t  type)

encode_SubjectType Encode a SubjectType.

Parameters
typeThe SubjectType to encode.
Returns
The encoded SubjectType.

Definition at line 707 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_SubjectInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_SymmetricAlgorithm()

QByteArray encode_SymmetricAlgorithm ( SymmetricAlgorithm_t  algorithm)

encode_SymmetricAlgorithm Encode a SymmetricAlgorithm.

Parameters
algorithmThe SymmetricAlgorithm to encode.
Returns
The encoded SymmetricAlgorithm.

Definition at line 107 of file encodeSecurity.cpp.

References encode_INTEGER().

Referenced by encode_EncryptionParameters(), and encode_PublicKey().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_ThreeDLocation()

QByteArray encode_ThreeDLocation ( ThreeDLocation_t  location)

encode_ThreeDLocation Encode a ThreeDLocation.

Parameters
locationThe ThreeDLocation to encode.
Returns
The encoded ThreeDLocation.

Definition at line 323 of file encodeSecurity.cpp.

References ThreeDLocation::elevation, encode_Opaque(), encode_SINTEGER(), ThreeDLocation::latitude, and ThreeDLocation::longitude.

Referenced by encode_HeaderField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_Time32()

QByteArray encode_Time32 ( Time32_t  time)

encode_Time32 Encode a Time32.

Parameters
timeThe Time32 to encode.
Returns
The encoded Time32.

Definition at line 290 of file encodeSecurity.cpp.

References encode_INTEGER().

Referenced by encode_HeaderField(), and encode_ValidityRestriction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_Time64()

QByteArray encode_Time64 ( Time64_t  time)

encode_Time64 Encode a Time64.

Parameters
timeThe Time64 to encode.
Returns
The encoded Time64.

Definition at line 291 of file encodeSecurity.cpp.

References encode_OCTET_STRING().

Referenced by encode_HeaderField(), and encode_Time64WithStandardDeviation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_Time64WithStandardDeviation()

QByteArray encode_Time64WithStandardDeviation ( Time64WithStandardDeviation_t  time)

encode_Time64WithStandardDeviation Encode a Time64WithStandardDeviation.

Parameters
timeThe Time64WithStandardDeviation to encode.
Returns
The encoded Time64WithStandardDeviation.

Definition at line 293 of file encodeSecurity.cpp.

References encode_INTEGER(), encode_Time64(), Time64WithStandardDeviation::log_std_dev, and Time64WithStandardDeviation::time.

Referenced by encode_HeaderField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_TrailerField()

QByteArray encode_TrailerField ( TrailerField_t  field)

encode_TrailerField Encode a TrailerField.

Parameters
fieldThe TrailerField to encode.
Returns
The encoded TrailerField.

Definition at line 581 of file encodeSecurity.cpp.

References TrailerField::trailer_field::choice, encode_Opaque(), encode_Signature(), encode_TrailerFieldType(), TrailerField::trailer_field::TrailerField__trailer_field_u::unknown_trailer_field::security_field, TrailerField::trailer_field::TrailerField__trailer_field_u::signature_trailer_field::sign, TrailerField::trailer_field::TrailerField__trailer_field_u::signature_trailer_field, TrailerField::trailer_field, TrailerFieldType_signature, TrailerField::type, ValidityRestriction::type, and TrailerField::trailer_field::TrailerField__trailer_field_u::unknown_trailer_field.

Referenced by encode_SecureTrailer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_TrailerFieldType()

QByteArray encode_TrailerFieldType ( TrailerFieldType_t  type)

encode_TrailerFieldType Encode a TrailerFieldType.

Parameters
typeThe TrailerFieldType to encode.
Returns
The encoded TrailerFieldType.

Definition at line 606 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_TrailerField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_TwoDLocation()

QByteArray encode_TwoDLocation ( TwoDLocation_t  location)

encode_TwoDLocation Encode a TwoDLocation.

Parameters
locationThe TwoDLocation to encode.
Returns
The encoded TwoDLocation.

Definition at line 309 of file encodeSecurity.cpp.

References encode_SINTEGER(), TwoDLocation::latitude, and TwoDLocation::longitude.

Referenced by encode_CircularRegion(), encode_PolygonalRegion(), and encode_RectangularRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_ValidityRestriction()

QByteArray encode_ValidityRestriction ( ValidityRestriction_t  validityRestriction)

encode_ValidityRestriction Encode a ValidityRestriction.

Parameters
validityRestrictionThe ValidityRestriction to encode.
Returns
The encoded ValidityRestriction.

Definition at line 775 of file encodeSecurity.cpp.

References ValidityRestriction::validity_restriction::choice, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::unknown_validity_restriction::data, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_start_and_duration::duration, encode_Duration(), encode_GeographicRegion(), encode_Opaque(), encode_Time32(), encode_ValidityRestrictionType(), ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_end::end_validity, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_start_and_end::end_validity, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::region::geographic_region, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::region, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_start_and_end::start_validity, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_start_and_duration::start_validity, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_end, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_start_and_duration, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::time_start_and_end, ValidityRestriction::type, ValidityRestriction::validity_restriction::ValidityRestriction__validity_restriction_u::unknown_validity_restriction, ValidityRestriction::validity_restriction, validityRestriction, ValidityRestrictionType_region, ValidityRestrictionType_time_end, ValidityRestrictionType_time_start_and_duration, and ValidityRestrictionType_time_start_and_end.

Referenced by encode_Certificate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_ValidityRestrictionType()

QByteArray encode_ValidityRestrictionType ( ValidityRestrictionType_t  type)

encode_ValidityRestrictionType Encode a ValidityRestrictionType.

Parameters
typeThe ValidityRestrictionType to encode.
Returns
The encoded ValidityRestrictionType.

Definition at line 819 of file encodeSecurity.cpp.

References encode_INTEGER(), and ValidityRestriction::type.

Referenced by encode_ValidityRestriction().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ intx_lentghs

quint8 intx_lentghs[]
static
Initial value:
=
{
0x00,
0x80,
0xC0,
0xE0,
0xF0,
0xF0,
0xF8,
0xFC,
0xFE
}

Definition at line 6 of file encodeSecurity.cpp.

Referenced by encode_INTX().