org.sigilaris.core.crypto.Sign
See theSign companion object
Type class for ECDSA signing operations.
Provides a type-safe interface for signing values of type A. The signing process first hashes the value using Hash, then signs the hash with ECDSA using the provided key pair.
Type parameters
- A
-
the type of value to sign
Attributes
- See also
-
Hash for hashing values
Signature for the signature representation
CryptoOps.sign for the underlying signing operation
- Example
-
import Sign.ops.* val keyPair = CryptoOps.generate() val message = Utf8("hello") // Sign a message val signature: Either[SigilarisFailure, Signature] = keyPair.sign(message) // Sign a pre-computed hash val hash = message.toHash val sig2 = hash.signBy(keyPair) - Companion
- object
- Source
- Sign.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article