Class CryptoSigningKey

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class CryptoSigningKey
    extends SpecificRecordBase implements SpecificRecord
                        

    Defines a signing key information.

    • Constructor Detail

      • CryptoSigningKey

        CryptoSigningKey()
        Default constructor.
      • CryptoSigningKey

        CryptoSigningKey(String id, String tenantId, String category, String alias, String hsmAlias, ByteBuffer publicKey, String schemeCodeName, String masterKeyAlias, Integer encodingVersion, String externalId, Instant created)
        All-args constructor.
        Parameters:
        id - The key's id.
        tenantId - The key owner.
        category - The key's category, such as TLS, LEDGER, etc.
        alias - Key's alias as defined by the tenant, the wrapped keys will have this value as null.
        hsmAlias - Key's alias which is used by the HSM, the wrapped keys will have this value as null.
        publicKey - Serialized public key.
        schemeCodeName - The key's signature scheme code.
        masterKeyAlias - For wrapped keys only, the master's key alias.
        encodingVersion - Encoding protocol version.
        externalId - External id associated with the key.
        created - Time ([Instant]) in milliseconds when the record was created.
    • Method Detail

      • getId

         String getId()

        Gets the value of the 'id' field.

      • setId

         void setId(String value)

        Sets the value of the 'id' field. The key's id.

        Parameters:
        value - the value to set.
      • setTenantId

         void setTenantId(String value)

        Sets the value of the 'tenantId' field. The key owner.

        Parameters:
        value - the value to set.
      • setCategory

         void setCategory(String value)

        Sets the value of the 'category' field. The key's category, such as TLS, LEDGER, etc.

        Parameters:
        value - the value to set.
      • setAlias

         void setAlias(String value)

        Sets the value of the 'alias' field. Key's alias as defined by the tenant, the wrapped keys will have this value as null.

        Parameters:
        value - the value to set.
      • setHsmAlias

         void setHsmAlias(String value)

        Sets the value of the 'hsmAlias' field. Key's alias which is used by the HSM, the wrapped keys will have this value as null.

        Parameters:
        value - the value to set.
      • setPublicKey

         void setPublicKey(ByteBuffer value)

        Sets the value of the 'publicKey' field. Serialized public key.

        Parameters:
        value - the value to set.
      • setSchemeCodeName

         void setSchemeCodeName(String value)

        Sets the value of the 'schemeCodeName' field. The key's signature scheme code.

        Parameters:
        value - the value to set.
      • setMasterKeyAlias

         void setMasterKeyAlias(String value)

        Sets the value of the 'masterKeyAlias' field. For wrapped keys only, the master's key alias.

        Parameters:
        value - the value to set.
      • setEncodingVersion

         void setEncodingVersion(Integer value)

        Sets the value of the 'encodingVersion' field. Encoding protocol version.

        Parameters:
        value - the value to set.
      • setExternalId

         void setExternalId(String value)

        Sets the value of the 'externalId' field. External id associated with the key.

        Parameters:
        value - the value to set.
      • setCreated

         void setCreated(Instant value)

        Sets the value of the 'created' field. Time ([Instant]) in milliseconds when the record was created.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<CryptoSigningKey> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<CryptoSigningKey> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<CryptoSigningKey> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
      • fromByteBuffer

         static CryptoSigningKey fromByteBuffer(ByteBuffer b)

        Deserializes a CryptoSigningKey from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class