Botan 1.10.17
bn_wrap.h
Go to the documentation of this file.
1/*
2* OpenSSL BN Wrapper
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_OPENSSL_BN_WRAP_H__
9#define BOTAN_OPENSSL_BN_WRAP_H__
10
11#include <botan/bigint.h>
12#include <openssl/bn.h>
13
14namespace Botan {
15
16/**
17* Lightweight OpenSSL BN wrapper. For internal use only.
18*/
20 {
21 public:
22 BIGNUM* value;
23
24 BigInt to_bigint() const;
25 void encode(byte[], size_t) const;
26 size_t bytes() const;
27
30
31 OSSL_BN& operator=(const OSSL_BN&);
32
33 OSSL_BN(const OSSL_BN&);
34 OSSL_BN(const BigInt& = 0);
35 OSSL_BN(const byte[], size_t);
36 ~OSSL_BN();
37 };
38
39/**
40* Lightweight OpenSSL BN_CTX wrapper. For internal use only.
41*/
43 {
44 public:
45 BN_CTX* value;
46
48
52 };
53
54}
55
56#endif
static SecureVector< byte > encode(const BigInt &n, Base base=Binary)
Definition big_code.cpp:64
BN_CTX * value
Definition bn_wrap.h:45
OSSL_BN_CTX & operator=(const OSSL_BN_CTX &)
Definition bn_wrap.cpp:110
size_t bytes() const
Definition bn_wrap.cpp:68
BigInt to_bigint() const
Definition bn_wrap.cpp:76
void encode(byte[], size_t) const
Definition bn_wrap.cpp:60
SecureVector< byte > to_bytes() const
Definition bn_wrap.h:28
OSSL_BN(const OSSL_BN &)
Definition bn_wrap.cpp:35
BIGNUM * value
Definition bn_wrap.h:22
OSSL_BN & operator=(const OSSL_BN &)
Definition bn_wrap.cpp:51