net.corda.core.crypto

## Class TransactionSignature

- net.corda.core.serialization.OpaqueBytes
- - net.corda.core.crypto.DigitalSignature
  - - net.corda.core.crypto.TransactionSignature

-     public class TransactionSignature
      extends DigitalSignature

  A wrapper around a digital signature accompanied with metadata, see MetaData.Full and `class DigitalSignature`. The signature protocol works as follows: s = sign(MetaData.hashBytes).

  See Also:
    MetaData.Full, `class DigitalSignature`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.corda.core.crypto.DigitalSignature

      `DigitalSignature.LegallyIdentifiable, DigitalSignature.WithKey`

    - ### Nested classes/interfaces inherited from class net.corda.core.serialization.OpaqueBytes

      `OpaqueBytes.Companion`

  - ### Field Summary

    - ### Fields inherited from class net.corda.core.serialization.OpaqueBytes

      `Companion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransactionSignature(byte[] signatureData, MetaData metaData)` A wrapper around a digital signature accompanied with metadata, see MetaData.Full and `class DigitalSignature`. The signature protocol works as follows: s = sign(MetaData.hashBytes).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MetaData` | `getMetaData()`
    `byte[]` | `getSignatureData()`
    `boolean` | `verify()` Function to auto-verify a `class MetaData` object's signature. Note that `class MetaData` contains both public key and merkle root of the transaction.

    - ### Methods inherited from class net.corda.core.serialization.OpaqueBytes

      `equals, getBytes, getSize, hashCode, open, toString`

- - ### Constructor Detail

    - #### TransactionSignature

          public TransactionSignature(byte[] signatureData,
                                      MetaData metaData)

      A wrapper around a digital signature accompanied with metadata, see MetaData.Full and `class DigitalSignature`. The signature protocol works as follows: s = sign(MetaData.hashBytes).

      See Also:
        MetaData.Full, `class DigitalSignature`

  - ### Method Detail

    - #### verify

          public boolean verify()

      Function to auto-verify a `class MetaData` object's signature. Note that `class MetaData` contains both public key and merkle root of the transaction.

      Throws:
        - if the key is invalid.
        - if this signatureData object is not initialized properly, the passed-in signatureData is improperly encoded or of the wrong type, if this signatureData algorithm is unable to process the input data provided, etc.
        - if the signature scheme is not supported for this private key or if any of the clear or signature data is empty.
      See Also:
        `class MetaData`, `class MetaData`

    - #### getSignatureData

          public byte[] getSignatureData()

    - #### getMetaData

          public MetaData getMetaData()