diff options
Diffstat (limited to 'src/pubkey/gost_3410/gost_3410.cpp')
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index 47438653d..46afad44e 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -8,11 +8,8 @@ */ #include <botan/gost_3410.h> -#include <botan/numthry.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> -#include <botan/secmem.h> -#include <botan/point_gfp.h> namespace Botan { @@ -30,6 +27,17 @@ MemoryVector<byte> GOST_3410_PublicKey::x509_subject_public_key() const return DER_Encoder().encode(bits, OCTET_STRING).get_contents(); } +AlgorithmIdentifier GOST_3410_PublicKey::algorithm_identifier() const + { + MemoryVector<byte> params = + DER_Encoder().start_cons(SEQUENCE) + .encode(OID(domain().get_oid())) + .end_cons() + .get_contents(); + + return AlgorithmIdentifier(get_oid(), params); + } + GOST_3410_PublicKey::GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id, const MemoryRegion<byte>& key_bits) { |