mirror of
https://github.com/saymrwulf/swisspost-evoting-go-poc.git
synced 2026-09-05 20:30:43 +00:00
27 lines
660 B
Go
27 lines
660 B
Go
|
|
package mixnet
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
|
||
|
|
"github.com/user/evote/pkg/trace"
|
||
|
|
)
|
||
|
|
|
||
|
|
// emitArgument publishes a KindArgument trace event for one Bayer-Groth
|
||
|
|
// sub-argument, mirroring the *ArgumentService classes of the Swiss Post
|
||
|
|
// crypto-primitives library. Cheap when tracing is off.
|
||
|
|
func emitArgument(name, caption, latex, ascii string, values map[string]string) {
|
||
|
|
trace.EmitFunc(func() trace.Event {
|
||
|
|
return trace.Event{
|
||
|
|
Kind: trace.KindArgument,
|
||
|
|
Caption: caption,
|
||
|
|
LaTeX: latex,
|
||
|
|
ASCII: ascii,
|
||
|
|
Values: values,
|
||
|
|
}
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
func dims(m, n int) map[string]string {
|
||
|
|
return map[string]string{"m": fmt.Sprintf("%d", m), "n": fmt.Sprintf("%d", n)}
|
||
|
|
}
|