23 lines
420 B
C++
23 lines
420 B
C++
#include <Void/Crypto/Crypto.hpp>
|
|
#include <Void/Update/Update.hpp>
|
|
|
|
int main()
|
|
{
|
|
auto k = Void::Crypto::Ed25519PrivateKey::generate();
|
|
if (!k.has_value()) {
|
|
return 1;
|
|
}
|
|
auto pub = k->public_key();
|
|
if (!pub.has_value()) {
|
|
return 2;
|
|
}
|
|
Void::Update::TrustStore trust;
|
|
if (!trust.bootstrap({{"k1", pub->bytes}}).has_value()) {
|
|
return 3;
|
|
}
|
|
if (!trust.snapshot().contains("k1")) {
|
|
return 4;
|
|
}
|
|
return 0;
|
|
}
|