Botan  2.6.0
Crypto and TLS for C++11
bigint.h
Go to the documentation of this file.
1 /*
2 * BigInt
3 * (C) 1999-2008,2012 Jack Lloyd
4 * 2007 FlexSecure
5 *
6 * Botan is released under the Simplified BSD License (see license.txt)
7 */
8 
9 #ifndef BOTAN_BIGINT_H_
10 #define BOTAN_BIGINT_H_
11 
12 #include <botan/types.h>
13 #include <botan/secmem.h>
14 #include <botan/exceptn.h>
15 #include <botan/loadstor.h>
16 #include <iosfwd>
17 
18 namespace Botan {
19 
20 class RandomNumberGenerator;
21 
22 /**
23 * Arbitrary precision integer
24 */
25 class BOTAN_PUBLIC_API(2,0) BigInt final
26  {
27  public:
28  /**
29  * Base enumerator for encoding and decoding
30  */
31  enum Base { Decimal = 10, Hexadecimal = 16, Binary = 256 };
32 
33  /**
34  * Sign symbol definitions for positive and negative numbers
35  */
36  enum Sign { Negative = 0, Positive = 1 };
37 
38  /**
39  * DivideByZero Exception
40  */
41  class BOTAN_PUBLIC_API(2,0) DivideByZero final : public Exception
42  {
43  public:
44  DivideByZero() : Exception("BigInt divide by zero") {}
45  };
46 
47  /**
48  * Create empty BigInt
49  */
50  BigInt() = default;
51 
52  /**
53  * Create BigInt from 64 bit integer
54  * @param n initial value of this BigInt
55  */
56  BigInt(uint64_t n);
57 
58  /**
59  * Copy Constructor
60  * @param other the BigInt to copy
61  */
62  BigInt(const BigInt& other);
63 
64  /**
65  * Create BigInt from a string. If the string starts with 0x the
66  * rest of the string will be interpreted as hexadecimal digits.
67  * Otherwise, it will be interpreted as a decimal number.
68  *
69  * @param str the string to parse for an integer value
70  */
71  explicit BigInt(const std::string& str);
72 
73  /**
74  * Create a BigInt from an integer in a byte array
75  * @param buf the byte array holding the value
76  * @param length size of buf
77  */
78  BigInt(const uint8_t buf[], size_t length);
79 
80  /**
81  * Create a BigInt from an integer in a byte array
82  * @param buf the byte array holding the value
83  * @param length size of buf
84  * @param base is the number base of the integer in buf
85  */
86  BigInt(const uint8_t buf[], size_t length, Base base);
87 
88  /**
89  * Create a BigInt from an integer in a byte array
90  * @param buf the byte array holding the value
91  * @param length size of buf
92  * @param max_bits if the resulting integer is more than max_bits,
93  * it will be shifted so it is at most max_bits in length.
94  */
95  BigInt(const uint8_t buf[], size_t length, size_t max_bits);
96 
97  /**
98  * Create a BigInt from an array of words
99  * @param words the words
100  * @param length number of words
101  */
102  BigInt(const word words[], size_t length);
103 
104  /**
105  * \brief Create a random BigInt of the specified size
106  *
107  * @param rng random number generator
108  * @param bits size in bits
109  * @param set_high_bit if true, the highest bit is always set
110  *
111  * @see randomize
112  */
113  BigInt(RandomNumberGenerator& rng, size_t bits, bool set_high_bit = true);
114 
115  /**
116  * Create BigInt of specified size, all zeros
117  * @param sign the sign
118  * @param n size of the internal register in words
119  */
120  BigInt(Sign sign, size_t n);
121 
122  /**
123  * Move constructor
124  */
125  BigInt(BigInt&& other)
126  {
127  this->swap(other);
128  }
129 
130  /**
131  * Move assignment
132  */
134  {
135  if(this != &other)
136  this->swap(other);
137 
138  return (*this);
139  }
140 
141  /**
142  * Copy assignment
143  */
144  BigInt& operator=(const BigInt&) = default;
145 
146  /**
147  * Swap this value with another
148  * @param other BigInt to swap values with
149  */
150  void swap(BigInt& other)
151  {
152  m_reg.swap(other.m_reg);
153  std::swap(m_signedness, other.m_signedness);
154  }
155 
157  {
158  m_reg.swap(reg);
159  }
160 
161  /**
162  * += operator
163  * @param y the BigInt to add to this
164  */
165  BigInt& operator+=(const BigInt& y);
166 
167  /**
168  * -= operator
169  * @param y the BigInt to subtract from this
170  */
171  BigInt& operator-=(const BigInt& y);
172 
173  /**
174  * *= operator
175  * @param y the BigInt to multiply with this
176  */
177  BigInt& operator*=(const BigInt& y);
178 
179  /**
180  * *= operator
181  * @param y the word to multiply with this
182  */
183  BigInt& operator*=(word y);
184 
185  /**
186  * /= operator
187  * @param y the BigInt to divide this by
188  */
189  BigInt& operator/=(const BigInt& y);
190 
191  /**
192  * Modulo operator
193  * @param y the modulus to reduce this by
194  */
195  BigInt& operator%=(const BigInt& y);
196 
197  /**
198  * Modulo operator
199  * @param y the modulus (word) to reduce this by
200  */
201  word operator%=(word y);
202 
203  /**
204  * Left shift operator
205  * @param shift the number of bits to shift this left by
206  */
207  BigInt& operator<<=(size_t shift);
208 
209  /**
210  * Right shift operator
211  * @param shift the number of bits to shift this right by
212  */
213  BigInt& operator>>=(size_t shift);
214 
215  /**
216  * Increment operator
217  */
218  BigInt& operator++() { return (*this += 1); }
219 
220  /**
221  * Decrement operator
222  */
223  BigInt& operator--() { return (*this -= 1); }
224 
225  /**
226  * Postfix increment operator
227  */
228  BigInt operator++(int) { BigInt x = (*this); ++(*this); return x; }
229 
230  /**
231  * Postfix decrement operator
232  */
233  BigInt operator--(int) { BigInt x = (*this); --(*this); return x; }
234 
235  /**
236  * Unary negation operator
237  * @return negative this
238  */
239  BigInt operator-() const;
240 
241  /**
242  * ! operator
243  * @return true iff this is zero, otherwise false
244  */
245  bool operator !() const { return (!is_nonzero()); }
246 
247  /**
248  * Multiply this with y
249  * @param y the BigInt to multiply with this
250  * @param ws a temp workspace
251  */
252  BigInt& mul(const BigInt& y, secure_vector<word>& ws);
253 
254  /**
255  * Square value of *this
256  * @param ws a temp workspace
257  */
259 
260  /**
261  * Set *this to y - *this
262  * @param y the BigInt to subtract from as a sequence of words
263  * @param y_size length of y in words
264  * @param ws a temp workspace
265  */
266  BigInt& rev_sub(const word y[], size_t y_size, secure_vector<word>& ws);
267 
268  /**
269  * Return *this below mod
270  *
271  * Assumes that *this is (if anything) only slightly larger than
272  * mod and performs repeated subtractions. It should not be used if
273  * *this is much larger than mod, instead of modulo operator.
274  */
275  void reduce_below(const BigInt& mod, secure_vector<word> &ws);
276 
277  /**
278  * Zeroize the BigInt. The size of the underlying register is not
279  * modified.
280  */
281  void clear() { zeroise(m_reg); }
282 
283  /**
284  * Compare this to another BigInt
285  * @param n the BigInt value to compare with
286  * @param check_signs include sign in comparison?
287  * @result if (this<n) return -1, if (this>n) return 1, if both
288  * values are identical return 0 [like Perl's <=> operator]
289  */
290  int32_t cmp(const BigInt& n, bool check_signs = true) const;
291 
292  /**
293  * Test if the integer has an even value
294  * @result true if the integer is even, false otherwise
295  */
296  bool is_even() const { return (get_bit(0) == 0); }
297 
298  /**
299  * Test if the integer has an odd value
300  * @result true if the integer is odd, false otherwise
301  */
302  bool is_odd() const { return (get_bit(0) == 1); }
303 
304  /**
305  * Test if the integer is not zero
306  * @result true if the integer is non-zero, false otherwise
307  */
308  bool is_nonzero() const { return (!is_zero()); }
309 
310  /**
311  * Test if the integer is zero
312  * @result true if the integer is zero, false otherwise
313  */
314  bool is_zero() const
315  {
316  const size_t sw = sig_words();
317 
318  for(size_t i = 0; i != sw; ++i)
319  if(m_reg[i])
320  return false;
321  return true;
322  }
323 
324  /**
325  * Set bit at specified position
326  * @param n bit position to set
327  */
328  void set_bit(size_t n);
329 
330  /**
331  * Clear bit at specified position
332  * @param n bit position to clear
333  */
334  void clear_bit(size_t n);
335 
336  /**
337  * Clear all but the lowest n bits
338  * @param n amount of bits to keep
339  */
340  void mask_bits(size_t n)
341  {
342  if(n == 0) { clear(); return; }
343 
344  const size_t top_word = n / BOTAN_MP_WORD_BITS;
345  const word mask = (static_cast<word>(1) << (n % BOTAN_MP_WORD_BITS)) - 1;
346 
347  if(top_word < size())
348  {
349  const size_t len = size() - (top_word + 1);
350  if (len > 0)
351  {
352  clear_mem(&m_reg[top_word+1], len);
353  }
354  m_reg[top_word] &= mask;
355  }
356  }
357 
358  /**
359  * Return bit value at specified position
360  * @param n the bit offset to test
361  * @result true, if the bit at position n is set, false otherwise
362  */
363  bool get_bit(size_t n) const
364  {
365  return ((word_at(n / BOTAN_MP_WORD_BITS) >> (n % BOTAN_MP_WORD_BITS)) & 1);
366  }
367 
368  /**
369  * Return (a maximum of) 32 bits of the complete value
370  * @param offset the offset to start extracting
371  * @param length amount of bits to extract (starting at offset)
372  * @result the integer extracted from the register starting at
373  * offset with specified length
374  */
375  uint32_t get_substring(size_t offset, size_t length) const;
376 
377  /**
378  * Convert this value into a uint32_t, if it is in the range
379  * [0 ... 2**32-1], or otherwise throw an exception.
380  * @result the value as a uint32_t if conversion is possible
381  */
382  uint32_t to_u32bit() const;
383 
384  /**
385  * @param n the offset to get a byte from
386  * @result byte at offset n
387  */
388  uint8_t byte_at(size_t n) const
389  {
390  return get_byte(sizeof(word) - (n % sizeof(word)) - 1,
391  word_at(n / sizeof(word)));
392  }
393 
394  /**
395  * Return the word at a specified position of the internal register
396  * @param n position in the register
397  * @return value at position n
398  */
399  word word_at(size_t n) const
400  { return ((n < size()) ? m_reg[n] : 0); }
401 
402  void set_word_at(size_t i, word w)
403  {
404  if(i >= m_reg.size())
405  grow_to(i + 1);
406  m_reg[i] = w;
407  }
408 
409  /**
410  * Tests if the sign of the integer is negative
411  * @result true, iff the integer has a negative sign
412  */
413  bool is_negative() const { return (sign() == Negative); }
414 
415  /**
416  * Tests if the sign of the integer is positive
417  * @result true, iff the integer has a positive sign
418  */
419  bool is_positive() const { return (sign() == Positive); }
420 
421  /**
422  * Return the sign of the integer
423  * @result the sign of the integer
424  */
425  Sign sign() const { return (m_signedness); }
426 
427  /**
428  * @result the opposite sign of the represented integer value
429  */
431  {
432  if(sign() == Positive)
433  return Negative;
434  return Positive;
435  }
436 
437  /**
438  * Flip the sign of this BigInt
439  */
440  void flip_sign()
441  {
442  set_sign(reverse_sign());
443  }
444 
445  /**
446  * Set sign of the integer
447  * @param sign new Sign to set
448  */
449  void set_sign(Sign sign)
450  {
451  if(is_zero())
452  m_signedness = Positive;
453  else
454  m_signedness = sign;
455  }
456 
457  /**
458  * @result absolute (positive) value of this
459  */
460  BigInt abs() const;
461 
462  /**
463  * Give size of internal register
464  * @result size of internal register in words
465  */
466  size_t size() const { return m_reg.size(); }
467 
468  /**
469  * Return how many words we need to hold this value
470  * @result significant words of the represented integer value
471  */
472  size_t sig_words() const
473  {
474  const word* x = m_reg.data();
475  size_t sig = m_reg.size();
476 
477  while(sig && (x[sig-1] == 0))
478  sig--;
479  return sig;
480  }
481 
482  /**
483  * Give byte length of the integer
484  * @result byte length of the represented integer value
485  */
486  size_t bytes() const;
487 
488  /**
489  * Get the bit length of the integer
490  * @result bit length of the represented integer value
491  */
492  size_t bits() const;
493 
494  /**
495  * Return a mutable pointer to the register
496  * @result a pointer to the start of the internal register
497  */
498  word* mutable_data() { return m_reg.data(); }
499 
500  /**
501  * Return a const pointer to the register
502  * @result a pointer to the start of the internal register
503  */
504  const word* data() const { return m_reg.data(); }
505 
507  const secure_vector<word>& get_word_vector() const { return m_reg; }
508 
509  /**
510  * Increase internal register buffer to at least n words
511  * @param n new size of register
512  */
513  void grow_to(size_t n);
514 
515  /**
516  * Resize the vector to the minimum word size to hold the integer, or
517  * min_size words, whichever is larger
518  */
519  void shrink_to_fit(size_t min_size = 0);
520 
521  /**
522  * Fill BigInt with a random number with size of bitsize
523  *
524  * If \p set_high_bit is true, the highest bit will be set, which causes
525  * the entropy to be \a bits-1. Otherwise the highest bit is randomly chosen
526  * by the rng, causing the entropy to be \a bits.
527  *
528  * @param rng the random number generator to use
529  * @param bitsize number of bits the created random value should have
530  * @param set_high_bit if true, the highest bit is always set
531  */
532  void randomize(RandomNumberGenerator& rng, size_t bitsize, bool set_high_bit = true);
533 
534  /**
535  * Store BigInt-value in a given byte array
536  * @param buf destination byte array for the integer value
537  */
538  void binary_encode(uint8_t buf[]) const;
539 
540  /**
541  * Read integer value from a byte array with given size
542  * @param buf byte array buffer containing the integer
543  * @param length size of buf
544  */
545  void binary_decode(const uint8_t buf[], size_t length);
546 
547  /**
548  * Read integer value from a byte array (secure_vector<uint8_t>)
549  * @param buf the array to load from
550  */
552  {
553  binary_decode(buf.data(), buf.size());
554  }
555 
556  /**
557  * @param base the base to measure the size for
558  * @return size of this integer in base base
559  */
560  size_t encoded_size(Base base = Binary) const;
561 
562  /**
563  * Place the value into out, zero-padding up to size words
564  * Throw if *this cannot be represented in size words
565  */
566  void encode_words(word out[], size_t size) const;
567 
568  /**
569  * @param rng a random number generator
570  * @param min the minimum value
571  * @param max the maximum value
572  * @return random integer in [min,max)
573  */
574  static BigInt random_integer(RandomNumberGenerator& rng,
575  const BigInt& min,
576  const BigInt& max);
577 
578  /**
579  * Create a power of two
580  * @param n the power of two to create
581  * @return bigint representing 2^n
582  */
583  static BigInt power_of_2(size_t n)
584  {
585  BigInt b;
586  b.set_bit(n);
587  return b;
588  }
589 
590  /**
591  * Encode the integer value from a BigInt to a std::vector of bytes
592  * @param n the BigInt to use as integer source
593  * @param base number-base of resulting byte array representation
594  * @result secure_vector of bytes containing the integer with given base
595  */
596  static std::vector<uint8_t> encode(const BigInt& n, Base base = Binary);
597 
598  /**
599  * Encode the integer value from a BigInt to a secure_vector of bytes
600  * @param n the BigInt to use as integer source
601  * @param base number-base of resulting byte array representation
602  * @result secure_vector of bytes containing the integer with given base
603  */
604  static secure_vector<uint8_t> encode_locked(const BigInt& n,
605  Base base = Binary);
606 
607  /**
608  * Encode the integer value from a BigInt to a byte array
609  * @param buf destination byte array for the encoded integer
610  * value with given base
611  * @param n the BigInt to use as integer source
612  * @param base number-base of resulting byte array representation
613  */
614  static void encode(uint8_t buf[], const BigInt& n, Base base = Binary);
615 
616  /**
617  * Create a BigInt from an integer in a byte array
618  * @param buf the binary value to load
619  * @param length size of buf
620  * @param base number-base of the integer in buf
621  * @result BigInt representing the integer in the byte array
622  */
623  static BigInt decode(const uint8_t buf[], size_t length,
624  Base base = Binary);
625 
626  /**
627  * Create a BigInt from an integer in a byte array
628  * @param buf the binary value to load
629  * @param base number-base of the integer in buf
630  * @result BigInt representing the integer in the byte array
631  */
633  Base base = Binary)
634  {
635  return BigInt::decode(buf.data(), buf.size(), base);
636  }
637 
638  /**
639  * Create a BigInt from an integer in a byte array
640  * @param buf the binary value to load
641  * @param base number-base of the integer in buf
642  * @result BigInt representing the integer in the byte array
643  */
644  static BigInt decode(const std::vector<uint8_t>& buf,
645  Base base = Binary)
646  {
647  return BigInt::decode(buf.data(), buf.size(), base);
648  }
649 
650  /**
651  * Encode a BigInt to a byte array according to IEEE 1363
652  * @param n the BigInt to encode
653  * @param bytes the length of the resulting secure_vector<uint8_t>
654  * @result a secure_vector<uint8_t> containing the encoded BigInt
655  */
656  static secure_vector<uint8_t> encode_1363(const BigInt& n, size_t bytes);
657 
658  static void encode_1363(uint8_t out[], size_t bytes, const BigInt& n);
659 
660  /**
661  * Encode two BigInt to a byte array according to IEEE 1363
662  * @param n1 the first BigInt to encode
663  * @param n2 the second BigInt to encode
664  * @param bytes the length of the encoding of each single BigInt
665  * @result a secure_vector<uint8_t> containing the concatenation of the two encoded BigInt
666  */
667  static secure_vector<uint8_t> encode_fixed_length_int_pair(const BigInt& n1, const BigInt& n2, size_t bytes);
668 
669  /**
670  * Set output = vec[idx].m_reg in constant time
671  * All words of vec must have the same size
672  */
673  static void const_time_lookup(
674  secure_vector<word>& output,
675  const std::vector<BigInt>& vec,
676  size_t idx);
677 
678  private:
679  secure_vector<word> m_reg;
680  Sign m_signedness = Positive;
681  };
682 
683 /*
684 * Arithmetic Operators
685 */
686 BigInt BOTAN_PUBLIC_API(2,0) operator+(const BigInt& x, const BigInt& y);
687 BigInt BOTAN_PUBLIC_API(2,0) operator-(const BigInt& x, const BigInt& y);
688 BigInt BOTAN_PUBLIC_API(2,0) operator*(const BigInt& x, const BigInt& y);
689 BigInt BOTAN_PUBLIC_API(2,0) operator/(const BigInt& x, const BigInt& d);
690 BigInt BOTAN_PUBLIC_API(2,0) operator%(const BigInt& x, const BigInt& m);
691 word BOTAN_PUBLIC_API(2,0) operator%(const BigInt& x, word m);
692 BigInt BOTAN_PUBLIC_API(2,0) operator<<(const BigInt& x, size_t n);
693 BigInt BOTAN_PUBLIC_API(2,0) operator>>(const BigInt& x, size_t n);
694 
695 /*
696 * Comparison Operators
697 */
698 inline bool operator==(const BigInt& a, const BigInt& b)
699  { return (a.cmp(b) == 0); }
700 inline bool operator!=(const BigInt& a, const BigInt& b)
701  { return (a.cmp(b) != 0); }
702 inline bool operator<=(const BigInt& a, const BigInt& b)
703  { return (a.cmp(b) <= 0); }
704 inline bool operator>=(const BigInt& a, const BigInt& b)
705  { return (a.cmp(b) >= 0); }
706 inline bool operator<(const BigInt& a, const BigInt& b)
707  { return (a.cmp(b) < 0); }
708 inline bool operator>(const BigInt& a, const BigInt& b)
709  { return (a.cmp(b) > 0); }
710 
711 /*
712 * I/O Operators
713 */
714 BOTAN_PUBLIC_API(2,0) std::ostream& operator<<(std::ostream&, const BigInt&);
715 BOTAN_PUBLIC_API(2,0) std::istream& operator>>(std::istream&, BigInt&);
716 
717 }
718 
719 namespace std {
720 
721 template<>
722 inline void swap<Botan::BigInt>(Botan::BigInt& x, Botan::BigInt& y)
723  {
724  x.swap(y);
725  }
726 
727 }
728 
729 #endif
bool get_bit(size_t n) const
Definition: bigint.h:363
bool operator!=(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
Definition: alg_id.cpp:90
bool is_negative() const
Definition: bigint.h:413
BigInt(BigInt &&other)
Definition: bigint.h:125
BigInt operator--(int)
Definition: bigint.h:233
bool operator>=(const X509_Time &t1, const X509_Time &t2)
Definition: asn1_time.cpp:266
BigInt & operator--()
Definition: bigint.h:223
int32_t cmp(const BigInt &n, bool check_signs=true) const
Definition: bigint.cpp:119
void clear_mem(T *ptr, size_t n)
Definition: mem_ops.h:97
const secure_vector< word > & get_word_vector() const
Definition: bigint.h:507
void set_bit(size_t n)
Definition: bigint.cpp:189
Sign sign() const
Definition: bigint.h:425
secure_vector< word > & get_word_vector()
Definition: bigint.h:506
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:27
bool is_zero() const
Definition: bigint.h:314
Definition: bigint.h:719
static BigInt decode(const std::vector< uint8_t > &buf, Base base=Binary)
Definition: bigint.h:644
word * mutable_data()
Definition: bigint.h:498
void swap_reg(secure_vector< word > &reg)
Definition: bigint.h:156
BigInt operator-(const BigInt &x, const BigInt &y)
Definition: big_ops3.cpp:49
bool is_even() const
Definition: bigint.h:296
static BigInt decode(const secure_vector< uint8_t > &buf, Base base=Binary)
Definition: bigint.h:632
void swap(BigInt &other)
Definition: bigint.h:150
bool is_nonzero() const
Definition: bigint.h:308
uint32_t to_u32bit(const std::string &str)
Definition: parsing.cpp:31
word word_at(size_t n) const
Definition: bigint.h:399
void mask_bits(size_t n)
Definition: bigint.h:340
const word * data() const
Definition: bigint.h:504
BigInt & operator++()
Definition: bigint.h:218
uint8_t byte_at(size_t n) const
Definition: bigint.h:388
bool operator<(const OID &a, const OID &b)
Definition: asn1_oid.cpp:105
BigInt abs(const BigInt &n)
Definition: numthry.h:55
std::string encode(const uint8_t der[], size_t length, const std::string &label, size_t width)
Definition: pem.cpp:43
void binary_decode(const secure_vector< uint8_t > &buf)
Definition: bigint.h:551
BigInt operator++(int)
Definition: bigint.h:228
bool is_odd() const
Definition: bigint.h:302
BigInt square(const BigInt &x)
Definition: mp_numth.cpp:19
std::vector< T, Alloc > & operator+=(std::vector< T, Alloc > &out, const std::vector< T, Alloc2 > &in)
Definition: secmem.h:133
Sign reverse_sign() const
Definition: bigint.h:430
size_t size() const
Definition: bigint.h:466
secure_vector< uint8_t > decode(DataSource &source, std::string &label)
Definition: pem.cpp:68
static BigInt power_of_2(size_t n)
Definition: bigint.h:583
Definition: alg_id.cpp:13
size_t sig_words() const
Definition: bigint.h:472
void clear()
Definition: bigint.h:281
T is_zero(T x)
Definition: ct_utils.h:118
void set_word_at(size_t i, word w)
Definition: bigint.h:402
uint8_t get_byte(size_t byte_num, T input)
Definition: loadstor.h:39
BigInt & operator=(BigInt &&other)
Definition: bigint.h:133
std::vector< T, secure_allocator< T > > secure_vector
Definition: secmem.h:88
void flip_sign()
Definition: bigint.h:440
bool operator>(const X509_Time &t1, const X509_Time &t2)
Definition: asn1_time.cpp:271
void set_sign(Sign sign)
Definition: bigint.h:449
bool is_positive() const
Definition: bigint.h:419
static BigInt decode(const uint8_t buf[], size_t length, Base base=Binary)
Definition: big_code.cpp:114
bool operator<=(const X509_Time &t1, const X509_Time &t2)
Definition: asn1_time.cpp:264
void zeroise(std::vector< T, Alloc > &vec)
Definition: secmem.h:183