mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
ircd:Ⓜ️ Identify public signing key by base58 of hash; truncate that.
This commit is contained in:
parent
623f4fec8c
commit
9886522da3
1 changed files with 4 additions and 3 deletions
|
@ -142,14 +142,15 @@ ircd::m::keys::init::signing()
|
|||
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
|
||||
{
|
||||
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",
|
||||
|
|
Loading…
Reference in a new issue