mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
libutil: Fix i686-linux build on clangStdenv
Clang refused to do a narrowing conversion in an initializer list:
```
local-keys.cc:56:90: note: insert an explicit cast to silence this issue
return name + ":" + base64::encode(std::as_bytes(std::span<const unsigned char>{sig, sigLen}));
^~~~~~
static_cast<size_type>( )
```
This commit is contained in:
parent
ffe5c1ecb4
commit
b5289fa130
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ std::string SecretKey::signDetached(std::string_view data) const
|
|||
unsigned char sig[crypto_sign_BYTES];
|
||||
unsigned long long sigLen;
|
||||
crypto_sign_detached(sig, &sigLen, (unsigned char *) data.data(), data.size(), (unsigned char *) key.data());
|
||||
return name + ":" + base64::encode(std::as_bytes(std::span<const unsigned char>{sig, sigLen}));
|
||||
return name + ":" + base64::encode(std::as_bytes(std::span<const unsigned char>(sig, sigLen)));
|
||||
}
|
||||
|
||||
PublicKey SecretKey::toPublicKey() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue