0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-30 02:32:43 +01:00

ircd:Ⓜ️ Identify public signing key by base58 of hash; truncate that.

This commit is contained in:
Jason Volk 2018-01-25 12:16:43 -08:00
parent 623f4fec8c
commit 9886522da3

View file

@ -142,14 +142,15 @@ ircd::m::keys::init::signing()
sha256{const_raw_buffer{self::public_key}} sha256{const_raw_buffer{self::public_key}}
}; };
const auto public_key_hash_b64 const auto public_key_hash_b58
{ {
b64encode_unpadded(hash) b58encode(hash)
}; };
static const auto trunc_size{8};
self::public_key_id = fmt::snstringf self::public_key_id = fmt::snstringf
{ {
BUFSIZE, "ed25519:%s", public_key_hash_b64 BUFSIZE, "ed25519:%s", trunc(public_key_hash_b58, trunc_size)
}; };
log.info("Current key is '%s' and the public key is: %s", log.info("Current key is '%s' and the public key is: %s",