diff options
Diffstat (limited to 'src/pubkey/dl_algo/dl_algo.cpp')
-rw-r--r-- | src/pubkey/dl_algo/dl_algo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pubkey/dl_algo/dl_algo.cpp b/src/pubkey/dl_algo/dl_algo.cpp index f035f852f..bf7ab0a6a 100644 --- a/src/pubkey/dl_algo/dl_algo.cpp +++ b/src/pubkey/dl_algo/dl_algo.cpp @@ -23,6 +23,16 @@ MemoryVector<byte> DL_Scheme_PublicKey::x509_subject_public_key() const return DER_Encoder().encode(y).get_contents(); } +DL_Scheme_PublicKey::DL_Scheme_PublicKey(const AlgorithmIdentifier& alg_id, + const MemoryRegion<byte>& key_bits, + DL_Group::Format format) + { + DataSource_Memory source(alg_id.parameters); + group.BER_decode(source, format); + + BER_Decoder(key_bits).decode(y); + } + /* * Return the X.509 public key decoder */ |