net.corda.core.crypto

## Class SignedData<T>

- net.corda.core.crypto.SignedData<T>

- Direct Known Subclasses:
    WireNodeRegistration

      public class SignedData<T>

  A serialized piece of data and its signature. Enforces signature validity in order to deserialize the data contained within.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SignedData(SerializedBytes<T> raw, DigitalSignature.WithKey sig)` A serialized piece of data and its signature. Enforces signature validity in order to deserialize the data contained within.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SerializedBytes<T>` | `getRaw()`
    `DigitalSignature.WithKey` | `getSig()`
    `T` | `verified()` Return the deserialized data if the signature can be verified.
    `void` | `verifyData(T data)` Verify the wrapped data after the signature has been verified and the data deserialised. Provided as an extension point for subclasses.

- - ### Constructor Detail

    - #### SignedData

          public SignedData(SerializedBytes<T> raw,
                            DigitalSignature.WithKey sig)

      A serialized piece of data and its signature. Enforces signature validity in order to deserialize the data contained within.

      Parameters:
        `raw` - the raw serialized data.
        `sig` - the (unverified) signature for the data.

  - ### Method Detail

    - #### verified

          public T verified()

      Return the deserialized data if the signature can be verified.

      Throws:
        - if the data is invalid (only used if verifyData() is overloaded).
        - if the signature is invalid.

    - #### verifyData

          public void verifyData(T data)

      Verify the wrapped data after the signature has been verified and the data deserialised. Provided as an extension point for subclasses.

      Throws:
        - if the data is invalid.

    - #### getRaw

          public SerializedBytes<T> getRaw()

    - #### getSig

          public DigitalSignature.WithKey getSig()