aboutsummaryrefslogtreecommitdiff
path: root/gotp.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-01-28 16:37:00 +0700
committerShulhan <ms@kilabit.info>2024-01-28 17:45:39 +0700
commit3aa08b00a1151249c6172f0739daac6be5ef857f (patch)
tree5f337e8d19a484ec2e50feea199ab36ae3402fab /gotp.go
parent6aeb5a7c882c30c9a9042f30f2ae16d35d2f47d3 (diff)
downloadgotp-3aa08b00a1151249c6172f0739daac6be5ef857f.tar.xz
all: make the path to private key static
Instead of prompting user, make the private key static, located at "$XDG_CONFIG_DIR/gotp/gotp.key". Implements: https://todo.sr.ht/~shulhan/gotp/1
Diffstat (limited to 'gotp.go')
-rw-r--r--gotp.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/gotp.go b/gotp.go
index b6e8204..52000a8 100644
--- a/gotp.go
+++ b/gotp.go
@@ -11,16 +11,19 @@ import (
// List of available algorithm for Provider.
const (
- HashSHA1 = `SHA1` // Default algorithm.
- HashSHA256 = `SHA256`
- HashSHA512 = `SHA512`
+ HashSHA1 = `SHA1` // Default algorithm.
+ HashSHA256 = `SHA256`
+ HashSHA512 = `SHA512`
+ defaultHash = HashSHA1
)
const (
- configFile = `gotp.conf`
- defaultHash = HashSHA1
+ configFile = `gotp.conf`
+ privateKeyFile = `gotp.key`
+)
- // List of known providers
+// List of known providers.
+const (
providerNameAegis = `aegis`
)