summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-06-22 16:35:47 +0700
committerShulhan <ms@kilabit.info>2024-06-22 17:21:56 +0700
commitdbe4f9722bbd63f685b36606abbfd97cbf1dfb10 (patch)
treeb1eb61d3f75aa60f65541ba51408d3d4a708b48d /testdata
parent4eaf76a096a0ba8ba5e687ede23c1dafd9064358 (diff)
downloadgotp-dbe4f9722bbd63f685b36606abbfd97cbf1dfb10.tar.xz
all: implement command "export"
The "export" command export all issuers to file or standard output, $ gotp export <FORMAT> [FILE] List of known supported FORMAT is: uri. If FILE is not defined it will print to standard output. The list of exported issuers are printed in order of its label.
Diffstat (limited to 'testdata')
-rw-r--r--testdata/cli_Export_test.txt3
-rw-r--r--testdata/cli_with_passphrase_test.txt5
2 files changed, 8 insertions, 0 deletions
diff --git a/testdata/cli_Export_test.txt b/testdata/cli_Export_test.txt
new file mode 100644
index 0000000..51ae320
--- /dev/null
+++ b/testdata/cli_Export_test.txt
@@ -0,0 +1,3 @@
+
+<<< uri
+otpauth://totp/test%20l@bel?algorithm=SHA1&issuer=IssuerName&secret=s3cr3t
diff --git a/testdata/cli_with_passphrase_test.txt b/testdata/cli_with_passphrase_test.txt
index 6eae769..6970956 100644
--- a/testdata/cli_with_passphrase_test.txt
+++ b/testdata/cli_with_passphrase_test.txt
@@ -57,6 +57,11 @@ test-sha1 = GKhXh+9sSkfRjpVfu8o1dIAPTyahjHpGZxfSTqFJIUnAJj3HpQGa0UO3QNQ4qN66CYRa
test-sha256 = e6BCkqDD0Su15P1PPyZz6PXiYhLQ+imlhpy99+r5xM+hbL6MfZ71JaXiXw5+1JJ5oM+yqV0ejzg6pW2U9yYu2M2QfDv7BxY8rV5+8fchKgWoZ7t3cfX9VX2OXKbjnZLMrO5vYFvk8jUfeemFzy9UvoCUfYdPq3V9/2IUStBgyWNRwOmHq6ImVc5/4YoMCqXvQ/rxUl/NCujF3qQvQPLCL2Abm/lQRdWiQDzEB8+tn40iax1XoGK4dYTeuJJX7tYwv2cvQctbjYJcb+9cA+AroHW0TuyBWt37iII1rCvIA9pBb45U17Aj74Xj1vH9/WamLWLAX9bfLZwgzl2/Qa7c86jgw5jlfPcVUvxtFOJSIS/2cudxD9j8EOg4cAzySry8WP+ZPxnVqI+I4ZqSVFOtV5uSXuTiVPXCv1gtVl44ChwJw38LVBztADffM6Iqp1WjeSbASFwzDvEZmR/7qqeSgPeem/k9oPKfAJwi251oXdj2gJxG1R+JaxVjNVs1qf75
test-sha512 = XDHGL4xQp3VCE4oIxKlBvKs9xwStDPaAe52RTXL3uiXU+RKH+w2Pgh9hl6O1mjyL4oSRJ872po9jLKxAk2OkOMINRbb601GaiuLY4Xhb/lOMQek0jCK0NDweMtodt5EAoMhSJ0styclEucHQWFLIFGwotfYTTjJYjombRFfG5CqsMB6XFQBvL5uvXpe2axJ+vyP3t0RuW/Rroovyn2lckZhyJGsHObyScC1sgdVoZhAeFDiihD6Cn1oLeiHrN9RviA8vPBZ1PV5+To2TLafJu+3InheeyIQWtBLVY8+dfVurYzpAHPi3rXc86FXIYaH9bI7muWWRIpN7lIb3RAZcYoXFdiXlvq07cd90FhsuCh9UuUzSEs1RtlsF2NhNobpP2xjMhdO+4LAaTqfew6snUUN/+G6lUDOBUeNp9HPzzMAlZG/eZ7y0u1dsd9vYwEr24ivDO+i66R4d9vmbCIohzHqc5HbSqZxi5k4H4mVnJTadC2fMrsp/nQaFtKjjX/VM
+<<< gotp.conf:export
+otpauth://totp/test-sha1?algorithm=SHA1&issuer=test-sha1&secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ
+otpauth://totp/test-sha256?algorithm=SHA256&issuer=test-sha256&secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ
+otpauth://totp/test-sha512?algorithm=SHA512&issuer=test-sha512&secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ
+
<<< get:test-sha1
SHA1:GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ:6:30: