api / org.gradle.plugins.signing.signatory / Signatory

Signatory

@Incubating interface Signatory

A signatory is an object capable of providing a signature for an arbitrary stream of bytes.

Since
4.5

Functions

getKeyId

abstract fun getKeyId(): String

Returns the id of the key that will be used for signing.

getName

abstract fun getName(): String

An identifying name for this signatory.

The name must be constant for the life of the signatory and should uniquely identify it within a project.

sign

abstract fun sign(toSign: InputStream, destination: OutputStream): Unit

Exhausts toSign, and writes the signature to signatureDestination. The caller is responsible for closing the streams, though the output WILL be flushed.

abstract fun sign(toSign: InputStream): ByteArray

Exhausts toSign, and returns the raw signature bytes.

Inheritors

SignatorySupport

abstract class SignatorySupport : Signatory

Convenience base class for Signatory implementations.