mirror of
https://github.com/logos-storage/logos-storage-nim-validator.git
synced 2026-01-08 08:23:06 +00:00
14 lines
363 B
Nim
14 lines
363 B
Nim
import pkg/blscurve
|
|
import ../hashing
|
|
import ./identity
|
|
|
|
export blscurve.Signature
|
|
export blscurve.sign
|
|
export blscurve.verify
|
|
|
|
func sign*(identity: Identity, hash: Hash): Signature =
|
|
blscurve.sign(identity, hash.toBytes())
|
|
|
|
func verify*(signature: Signature, identifier: Identifier, hash: Hash): bool =
|
|
blscurve.verify(identifier, hash.toBytes(), signature)
|