corda / net.corda.core.crypto / DigitalSignature

DigitalSignature

open class DigitalSignature : OpaqueBytes

A wrapper around a digital signature.

Types

WithKey

open class WithKey : DigitalSignature

A digital signature that identifies who the public key is owned by.

Constructors

<init>

DigitalSignature(bytes: ByteArray)

A wrapper around a digital signature.

Inherited Properties

bytes

val bytes: ByteArray

The bytes are always cloned so that this object becomes immutable. This has been done to prevent tampering with entities such as net.corda.core.crypto.SecureHash and net.corda.core.contracts.PrivacySalt, as well as preserve the integrity of our hash constants net.corda.core.crypto.SecureHash.zeroHash and net.corda.core.crypto.SecureHash.allOnesHash.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.

deserialize

fun <T : Any> ByteSequence.deserialize(serializationFactory: SerializationFactory = SerializationFactory.defaultFactory, context: SerializationContext = serializationFactory.defaultContext): T

Convenience extension method for deserializing a ByteSequence, utilising the defaults.

deserializeWithCompatibleContext

fun <T : Any> ByteSequence.deserializeWithCompatibleContext(serializationFactory: SerializationFactory = SerializationFactory.defaultFactory, context: SerializationContext = serializationFactory.defaultContext): ObjectWithCompatibleContext<T>

Additionally returns SerializationContext which was used for encoding. It might be helpful to know SerializationContext to use the same encoding in the reply.

sha256

fun OpaqueBytes.sha256(): SHA256

Compute the SHA-256 hash for the contents of the OpaqueBytes.

Inheritors

TransactionSignature

class TransactionSignature : DigitalSignature

A wrapper over the signature output accompanied by signer's public key and signature metadata. This is similar to DigitalSignature.WithKey, but targeted to DLT transaction (or block of transactions) signatures.

WithKey

open class WithKey : DigitalSignature

A digital signature that identifies who the public key is owned by.