Package com.wibu.cm

Class CodeMeter.CMBASECRYPT

  • Enclosing class:
    CodeMeter

    public static class CodeMeter.CMBASECRYPT
    extends java.lang.Object
    CMBASECRYPT stores all needed parameters needed for every possible en- or decryption.

    CMBASECRYPT stores all needed parameters needed for every possible en- or decryption.

    Definition for the class CMBASECRYPT corresponding to the c-api struct CMBASECRYPT

    • Field Summary

      Fields 
      Modifier and Type Field Description
      long crc
      contains the CRC of the cuurent operation.
      long ctrl
      ctrl contains commands and flags influencing the en- or decryption.
      long encryptionCode
      contains the Encryption Code set by the user.
      long encryptionCodeOptions
      contains one or more of the following flags: CM_CRYPT_RES1MASK [TBA]. CM_CRYPT_UCMASK specifies all flags for the UnitCounter. CM_CRYPT_UCCHECK specifies that the UnitCounter is checked if one availabe. CM_CRYPT_UCIGNORE specifies that there must not any UnitCounter. CM_CRYPT_UCREQUIRED specifies that a UnitCount must be available. CM_CRYPT_ATMASK specifies all flags for the Activation Time. CM_CRYPT_ATCHECK specifies that the Activation Time is checked if one availabe. CM_CRYPT_ATIGNORE specifies that there must not any Activation Time. CM_CRYPT_ATREQUIRED specifies that a Activation Time must be available. CM_CRYPT_ETMASK specifies all flags for the Expiration Date. CM_CRYPT_ETCHECK specifies that the Expiration Date is checked if one availabe. CM_CRYPT_ETIGNORE specifies that there must not any Expiration Date. CM_CRYPT_ETREQUIRED specifies that a Expiration Date must be available. CM_CRYPT_CERTTIME specifies that the current operation calculated the sequence for a Certified Time and Date Stamp update. CM_CRYPT_FACDECREMENT specifies that the Firm Access Counter must be decremented. CM_CRYPT_RES2MASK [TBA]. CM_CRYPT_SAMASK specifies all flags for the network access. CM_CRYPT_SAEXCLUSIVE specifies that the current access is done with Exclusive Mode. CM_CRYPT_SAUNLIMITED specifies that the current access is done with No User Limmit. CM_CRYPT_SAUSERLIMIT specifies that the current access is done with User Limit. CM_CRYPT_SASTATIONSHARE specifies that the current access is done with StationShare Mode. CM_CRYPT_RES3MASK [TBA]. CM_CRYPT_UCDELTAMASK specifies the maximum value for UnitCounter decrementation.
      long featureCode
      specifies the FeatureCode mapping the exiting FeatureMap.
      long keyExtType
      specifies the KeySource if the encryption is done with a HiddenData or a SecretData.
    • Constructor Summary

      Constructors 
      Constructor Description
      CMBASECRYPT()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ctrl

        public long ctrl
        ctrl contains commands and flags influencing the en- or decryption. The parameter can be have the following flags:

        Used Key:

        • CM_CRYPT_FIRMKEY specifies that the key for the encryption is stored in the Firm Key of a Firm Item.
        • CM_CRYPT_HIDDENDATA specifies that the key for the encryption is stored in a HiddenData of a Product Item. The KeySource must als specified here.
        • CM_CRYPT_SECRETDATA specifies that the key for the encryption is stored in a SecretData of a Product Item. The KeySource must als specified here.

        Used Encryption Algorithm:

        • CM_CRYPT_AES specifies that for the encryption algorithm the Advanced Encryption Standard (AES) is used.
        • CM_CRYPT_ECIES specifies that for the encryption algorithm the Elliptic Curve Integrated Encryption Scheme (ECIES) is used. This flag is only allowed for direct encryption (see Encryption Modes)
        • CM_CRYPT_ECIES_STD specifies that for the encryption algorithm the Elliptic Curve Integrated Encryption Scheme (ECIES) is used. This option executes the standard ECIES. This flag only works with direct encryption. Encryption only works with simulated encryption (CmCryptSim). Here the length of the buffer must be at least 64 bytes (CM_PUBLIC_KEY_LEN) larger than the input sequence to add the public key behind the encrypted sequence. Decryption only works with real decryption (CmCrypt). Though the returned length is 64 bytes smaller than the input sequence. This flag is only allowed for direct encryption (see Encryption Modes)

        CRC calculation:

        • CM_CRYPT_CHKCRC specifies that the CRC value stored in crc should be checked with the CRC of the current operation.
        • CM_CRYPT_CALCCRC specifies that the CRC of the current operation should be calculated and stored in crc.

      • keyExtType

        public long keyExtType
        specifies the KeySource if the encryption is done with a HiddenData or a SecretData.
      • encryptionCode

        public long encryptionCode
        contains the Encryption Code set by the user.
      • encryptionCodeOptions

        public long encryptionCodeOptions
        contains one or more of the following flags:
        • CM_CRYPT_RES1MASK [TBA].
        • CM_CRYPT_UCMASK specifies all flags for the UnitCounter.
        • CM_CRYPT_UCCHECK specifies that the UnitCounter is checked if one availabe.
        • CM_CRYPT_UCIGNORE specifies that there must not any UnitCounter.
        • CM_CRYPT_UCREQUIRED specifies that a UnitCount must be available.
        • CM_CRYPT_ATMASK specifies all flags for the Activation Time.
        • CM_CRYPT_ATCHECK specifies that the Activation Time is checked if one availabe.
        • CM_CRYPT_ATIGNORE specifies that there must not any Activation Time.
        • CM_CRYPT_ATREQUIRED specifies that a Activation Time must be available.
        • CM_CRYPT_ETMASK specifies all flags for the Expiration Date.
        • CM_CRYPT_ETCHECK specifies that the Expiration Date is checked if one availabe.
        • CM_CRYPT_ETIGNORE specifies that there must not any Expiration Date.
        • CM_CRYPT_ETREQUIRED specifies that a Expiration Date must be available.
        • CM_CRYPT_CERTTIME specifies that the current operation calculated the sequence for a Certified Time and Date Stamp update.
        • CM_CRYPT_FACDECREMENT specifies that the Firm Access Counter must be decremented.
        • CM_CRYPT_RES2MASK [TBA].
        • CM_CRYPT_SAMASK specifies all flags for the network access.
        • CM_CRYPT_SAEXCLUSIVE specifies that the current access is done with Exclusive Mode.
        • CM_CRYPT_SAUNLIMITED specifies that the current access is done with No User Limmit.
        • CM_CRYPT_SAUSERLIMIT specifies that the current access is done with User Limit.
        • CM_CRYPT_SASTATIONSHARE specifies that the current access is done with StationShare Mode.
        • CM_CRYPT_RES3MASK [TBA].
        • CM_CRYPT_UCDELTAMASK specifies the maximum value for UnitCounter decrementation.
      • featureCode

        public long featureCode
        specifies the FeatureCode mapping the exiting FeatureMap. The operation fails when the FeatureCode contains bits, which are not existing in the FeatureMap.
      • crc

        public long crc
        contains the CRC of the cuurent operation. It depends on the CM_CRYPT_CALCCRC or CM_CRYPT_CHKCRC the flags if this value is set or checked.
    • Constructor Detail

      • CMBASECRYPT

        public CMBASECRYPT()