mirror of
https://github.com/fiatjaf/nak.git
synced 2024-11-22 16:19:07 -05:00
fix inconsistency in nak key decrypt output: print hex always.
This commit is contained in:
parent
54c4be10bd
commit
bca4362ca5
6
key.go
6
key.go
|
@ -116,8 +116,7 @@ var decrypt = &cli.Command{
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to decrypt: %s", err)
|
return fmt.Errorf("failed to decrypt: %s", err)
|
||||||
}
|
}
|
||||||
nsec, _ := nip19.EncodePrivateKey(sec)
|
stdout(sec)
|
||||||
stdout(nsec)
|
|
||||||
return nil
|
return nil
|
||||||
case 1:
|
case 1:
|
||||||
if arg := c.Args().Get(0); strings.HasPrefix(arg, "ncryptsec1") {
|
if arg := c.Args().Get(0); strings.HasPrefix(arg, "ncryptsec1") {
|
||||||
|
@ -136,8 +135,7 @@ var decrypt = &cli.Command{
|
||||||
ctx = lineProcessingError(ctx, "failed to decrypt: %s", err)
|
ctx = lineProcessingError(ctx, "failed to decrypt: %s", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
nsec, _ := nip19.EncodePrivateKey(sec)
|
stdout(sec)
|
||||||
stdout(nsec)
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user