Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
1670c2fd
Commit
1670c2fd
authored
Dec 17, 2018
by
Sietse Ringers
Browse files
Support base64 in irmameta cli tool
parent
7a2acc44
Changes
1
Hide whitespace changes
Inline
Side-by-side
irmameta/irmameta.go
View file @
1670c2fd
...
...
@@ -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
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment