From bb1680078e1c08d2d9c66cfac3a5d926ae85e16a Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 20 May 2020 18:12:43 +0200 Subject: [PATCH] replace base64 with -0 64 from natools --- README.md | 1 - sendmsg.sh | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0dcaa55..b5930f0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Dépendances à installer en amont: - Debian 9/10 - nodejs>8 (Pour JSON.Stringify simplement) -- base58 # Utilisation diff --git a/sendmsg.sh b/sendmsg.sh index 7f98c9a..ddfc018 100755 --- a/sendmsg.sh +++ b/sendmsg.sh @@ -13,8 +13,8 @@ pod="https://data.gchange.fr" # Adresse du pod Cesium ou Gchange à utili # Récupération et chiffrement du titre et du message -title=$(./natools.py encrypt -i helloworld/title --pubsec -p DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech | base58) -content=$(./natools.py encrypt -i helloworld/content --pubsec -p DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech | base58) +title=$(./natools.py encrypt -i helloworld/title --pubsec -p DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech -O 58) +content=$(./natools.py encrypt -i helloworld/content --pubsec -p DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech -O 58) times=$(date -u +'%s') nonce=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) @@ -31,7 +31,7 @@ hash=$(echo "{ hash=$(node -p "JSON.stringify(\"$hash\")") # Fabrication de la signature -signature=$(echo "$hash" | ./natools.py sign --pubsec -k ~/dev/trousseau-Do99s6wQ-g1-PubSec.dunikey --noinc | base64) +signature=$(echo "$hash" | ./natools.py sign --pubsec -k ~/dev/trousseau-Do99s6wQ-g1-PubSec.dunikey --noinc -O 64) # Affichage du JSON final echo "{