Move mint utility to syndicate_utils

This commit is contained in:
Emery Hemingway 2023-08-25 18:31:32 +01:00
parent dcd6bfe99b
commit d86ef24c01
2 changed files with 2 additions and 19 deletions

View File

@ -49,21 +49,4 @@ proc validate*[T](key: openarray[byte]; sturdy: SturdyRef[T]): bool =
sig = hmac(sig, encode cav)
result = (sig == ctrl.get.bytes)
when isMainModule:
from os import commandLineParams
var key: array[16, byte]
case readBytes(stdin, key, 0, 16)
of 16: discard
of 0: stderr.writeLine "using null key"
else: quit "expected sixteen bytes of key from stdin"
var oids: seq[Preserve[void]]
for p in commandLineParams():
add(oids, parsePreserves p)
if oids.len == 0: oids.add(toPreserve "syndicate")
for oid in oids:
let sturdy = mint(key, oid)
doAssert validate(key, sturdy)
stdout.writeLine(sturdy)
# mint utility moved to syndicate_utils/src/mintsturdyref.nim

View File

@ -1,6 +1,6 @@
# Package
version = "20230822"
version = "20230825"
author = "Emery Hemingway"
description = "Syndicated actors for conversational concurrency"
license = "Unlicense"