aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-java/src/test/resources
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-11-08 17:06:15 +0100
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-11-08 17:12:54 +0100
commit29993d7fa6af8edbc51dcd903a1e27d3f62b4e82 (patch)
tree19e211cf4be60d056dd4834b532e5027df279260 /vespaclient-java/src/test/resources
parentf268379cb63e70cefaea18999767244a7d8bfc7f (diff)
Add a simple base conversion tool
Currently supports converting from and to any combination of base {16, 58, 62, 64}. Input is read from STDIN and is intentionally limited in length due to the algorithmic complexity of base conversions that are not a power of two. Converted value is written to STDOUT.
Diffstat (limited to 'vespaclient-java/src/test/resources')
-rw-r--r--vespaclient-java/src/test/resources/expected-convert-base-help-output.txt10
-rw-r--r--vespaclient-java/src/test/resources/expected-help-output.txt2
2 files changed, 11 insertions, 1 deletions
diff --git a/vespaclient-java/src/test/resources/expected-convert-base-help-output.txt b/vespaclient-java/src/test/resources/expected-convert-base-help-output.txt
new file mode 100644
index 00000000000..8a65c2240e0
--- /dev/null
+++ b/vespaclient-java/src/test/resources/expected-convert-base-help-output.txt
@@ -0,0 +1,10 @@
+usage: vespa-security convert-base --from <base N> --to <base M>
+Reads up to 1024 bytes of STDIN interpreted as a base N string (ignoring
+whitespace) and writes to STDOUT as a base M string. Note that base 64 is
+expected to be in (and is output as) the URL-safe alphabet (padding
+optional for input, no padding for output).
+ -f,--from <arg> From base. Supported values: 16, 58, 62, 64
+ -h,--help Show help
+ -t,--to <arg> To base. Supported values: 16, 58, 62, 64
+Note: this is a BETA tool version; its interface may be changed at any
+time.
diff --git a/vespaclient-java/src/test/resources/expected-help-output.txt b/vespaclient-java/src/test/resources/expected-help-output.txt
index c973735ad46..8cea1366973 100644
--- a/vespaclient-java/src/test/resources/expected-help-output.txt
+++ b/vespaclient-java/src/test/resources/expected-help-output.txt
@@ -1,4 +1,4 @@
usage: vespa-security <tool> [TOOL OPTIONS]
-Where <tool> is one of: keygen, encrypt, decrypt, token-info
+Where <tool> is one of: keygen, encrypt, decrypt, token-info, convert-base
-h,--help Show help
Invoke vespa-security <tool> --help for tool-specific help