mirror of
https://github.com/NixOS/nix.git
synced 2025-11-10 12:36:01 +01:00
This will facilitate breaking up Nix into multiple packages for each component with Meson.
23 lines
399 B
C++
23 lines
399 B
C++
#include "signature/signer.hh"
|
|
#include "error.hh"
|
|
|
|
#include <sodium.h>
|
|
|
|
namespace nix {
|
|
|
|
LocalSigner::LocalSigner(SecretKey && privateKey)
|
|
: privateKey(privateKey)
|
|
, publicKey(privateKey.toPublicKey())
|
|
{ }
|
|
|
|
std::string LocalSigner::signDetached(std::string_view s) const
|
|
{
|
|
return privateKey.signDetached(s);
|
|
}
|
|
|
|
const PublicKey & LocalSigner::getPublicKey()
|
|
{
|
|
return publicKey;
|
|
}
|
|
|
|
}
|