From: Steven Baltakatei Sandoval Date: Sun, 5 Jul 2020 01:12:09 +0000 (+0000) Subject: style(unitproc):checkAgePubkey: Add sample code X-Git-Tag: 0.3.0~59 X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/46e8086f76408b19faeb7d7e72386432c8f0e802?ds=inline;hp=fe0c8dd2026febd527dcf65a330324de6cad0567 style(unitproc):checkAgePubkey: Add sample code --- diff --git a/unitproc/bktemp-checkAgePubkey b/unitproc/bktemp-checkAgePubkey index 8089111..6b08879 100644 --- a/unitproc/bktemp-checkAgePubkey +++ b/unitproc/bktemp-checkAgePubkey @@ -3,7 +3,7 @@ checkAgePubkey() { # Desc: Checks if string is an age-compatible pubkey # Usage: checkAgePubkey [str pubkey] - # Version: 0.1.0 + # Version: 0.1.1 # Input: arg1: string # Output: return code 0: string is age-compatible pubkey # return code 1: string is NOT an age-compatible pubkey @@ -17,3 +17,13 @@ checkAgePubkey() { return 1; fi; } # Check age pubkey + +#==BEGIN sample code== +myKey="age18nnr0nm9fg44elkhrrcn3uhalvug04swas6su464k2kx92l05v6s4exfcz"; +if checkAgePubkey "$myKey"; then echo "Is an age-compatible public key:$myKey"; else echo "Is NOT an age-compatible public key:$myKey"; fi +myKey2="blahblahblah"; +if checkAgePubkey "$myKey2"; then echo "Is an age-compatible public key:$myKey2"; else echo "Is NOT an age-compatible public key:$myKey2"; fi +#==END sample code== + +# Author: Steven Baltakatei Sandoval +# License: GPLv3+