Commit 1670c2fd authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Support base64 in irmameta cli tool

parent 7a2acc44
......@@ -20,10 +20,15 @@ func main() {
fmt.Println("Usage: irmago path_to_irma_configuration metadata_attribute_in_decimal")
}
metaint, ok := new(big.Int).SetString(os.Args[2], 10)
metaint := new(big.Int)
_, ok := metaint.SetString(os.Args[2], 10)
if !ok {
fmt.Println("Could not parse argument as decimal integer:")
os.Exit(1)
bts, err := base64.StdEncoding.DecodeString(os.Args[2])
if err != nil {
fmt.Println("Could not parse argument as decimal or base64 integer: ", err.Error())
os.Exit(1)
}
metaint.SetBytes(bts)
}
confpath := os.Args[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment