summaryrefslogtreecommitdiff
path: root/xed25519.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-09-14 13:09:16 -0400
committerJeffrey Walton <noloader@gmail.com>2021-09-14 13:09:16 -0400
commitfae99431186db04cf66dc395e3c885a6b26b7997 (patch)
tree538af2c1b8f88bd914fcfa0119bebad60daf54be /xed25519.cpp
parent36cf69b58559537af3e5b10d61034192d6426591 (diff)
downloadcryptopp-git-fae99431186db04cf66dc395e3c885a6b26b7997.tar.gz
Add ed25519Signer and ed25519Verifier overloads
Diffstat (limited to 'xed25519.cpp')
-rw-r--r--xed25519.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/xed25519.cpp b/xed25519.cpp
index 1c1132be..7fffa83f 100644
--- a/xed25519.cpp
+++ b/xed25519.cpp
@@ -663,6 +663,11 @@ ed25519Signer::ed25519Signer(const Integer &x)
("DerivePublicKey", true));
}
+ed25519Signer::ed25519Signer(const PKCS8PrivateKey &key)
+ : m_key(dynamic_cast<const ed25519PrivateKey&>(key))
+{
+}
+
ed25519Signer::ed25519Signer(RandomNumberGenerator &rng)
{
AccessPrivateKey().GenerateRandom(rng);
@@ -849,6 +854,11 @@ ed25519Verifier::ed25519Verifier(const Integer &y)
(Name::PublicElement(), ConstByteArrayParameter(by, PUBLIC_KEYLENGTH, false)));
}
+ed25519Verifier::ed25519Verifier(const X509PublicKey &key)
+ : m_key(dynamic_cast<const ed25519PublicKey &>(key))
+{
+}
+
ed25519Verifier::ed25519Verifier(BufferedTransformation &params)
{
AccessPublicKey().Load(params);