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:
Josh Juran
2015-03-25 14:01:01 -07:00
committed by seelabs
parent 6675ee7f5c
commit 7d75041fb1
5 changed files with 33 additions and 3 deletions

View File

@@ -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);