Skip to content
It's Vapor Week! Celebrating 10 Years of Vapor Read more

Instance Method

sign(_:)

Creates a signature from the supplied plaintext.
func sign<Plaintext>(_ plaintext: Plaintext) throws -> [UInt8] where Plaintext : DataProtocol

Parameters

plaintext

Plaintext data to sign.

Return Value

Signature unique to the supplied data.

Discussion

let sig = try alg.sign("hello")