diff --git a/CHANGELOG.fr.md b/CHANGELOG.fr.md index 3a3abe867c9d16bd32ed373ea8d3e7302e501da3..6190c5ae2336e773f922ba569dd8a47b8719907b 100644 --- a/CHANGELOG.fr.md +++ b/CHANGELOG.fr.md @@ -13,9 +13,14 @@ et ce projet adhère au [versionnage sémantique](https://semver.org/spec/v2.0.0 ## [Non-publié/Non-Stabilisé] (par [1000i100]) -## [Version 3.1.0] - 2021-04-01 (par [1000i100] && [Hugo]) +## [Version 3.1.0] - 2021-04-01 (par [1000i100] & [Hugo]) ### Ajouté - génération du [format court d'affichage de pubKey](https://forum.duniter.org/t/format-de-checksum/7616) + ```javascript + import {pubKey2shortKey} from 'g1lib/crypto.mjs'; + const shortKey = pubKey2shortKey("Mutu112HLfUbgVy4obN9kp3MnnDGShke88wrZr2Yr41"); + // shortKey === "Mutu…Yr41:5cq" + ``` ## [Version 3.0.2] - 2020-12-10 (par [1000i100]) ### Ajouté diff --git a/src/crypto.test.mjs b/src/crypto.test.mjs index ff180a1289972aa4cac08e7bf7c8ec4b3b113c3d..439c6c10957f58864b20ee70567c23c758599726 100644 --- a/src/crypto.test.mjs +++ b/src/crypto.test.mjs @@ -28,9 +28,9 @@ test('idSecPass2cleanKeys should output clean base58 keys and seed', async t => t.is(r.idSec, idSec); t.is(r.password, mdp); }); -test('pubKey2shortKey match D2me…wRaU:76W', t => { - const pubKey = 'D2meevcAHFTS2gQMvmRW5Hzi25jDdikk4nC4u1FkwRaU'; - const shortKey = 'D2me…wRaU:76W'; +test('pubKey2shortKey match Mutu…Yr41:5cq', t => { + const pubKey = 'Mutu112HLfUbgVy4obN9kp3MnnDGShke88wrZr2Yr41'; + const shortKey = 'Mutu…Yr41:5cq'; t.is(app.pubKey2shortKey(pubKey), shortKey); }); test('pubKey2shortKey match RML1…zvSY:3k4', t => {