mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fixes to cryptographic containers:
* Include Sign.cpp in unity builds * Fix AnySecretKey publicKey and sign * Make AnyPublicKey copyable * Define op != for Slice * Overload op << for Slice * Overload op << for KeyType
This commit is contained in:
@@ -77,7 +77,7 @@ AnySecretKey::publicKey() const
|
||||
{
|
||||
unsigned char buf[33];
|
||||
buf[0] = 0xED;
|
||||
ed25519_publickey(p_.data() + 1, &buf[1]);
|
||||
ed25519_publickey(p_.data(), &buf[1]);
|
||||
return AnyPublicKey(buf, sizeof(buf));
|
||||
}
|
||||
default:
|
||||
@@ -94,7 +94,7 @@ AnySecretKey::sign (
|
||||
{
|
||||
case KeyType::ed25519:
|
||||
{
|
||||
auto const sk = p_.data() + 1;
|
||||
auto const sk = p_.data();
|
||||
ed25519_public_key pk;
|
||||
ed25519_publickey(sk, pk);
|
||||
Buffer b(64);
|
||||
|
||||
Reference in New Issue
Block a user