From 0f75ff1d09f88603f41be493a30ccf52251cdaa7 Mon Sep 17 00:00:00 2001 From: weidai Date: Sat, 26 Jan 2013 20:39:50 +0000 Subject: [PATCH] add Save/Load --- rw.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rw.h b/rw.h index ec8b8507..6820251e 100644 --- a/rw.h +++ b/rw.h @@ -22,6 +22,11 @@ public: void BERDecode(BufferedTransformation &bt); void DEREncode(BufferedTransformation &bt) const; + void Save(BufferedTransformation &bt) const + {DEREncode(bt);} + void Load(BufferedTransformation &bt) + {BERDecode(bt);} + Integer ApplyFunction(const Integer &x) const; Integer PreimageBound() const {return ++(m_n>>1);} Integer ImageBound() const {return m_n;} @@ -52,6 +57,11 @@ public: void BERDecode(BufferedTransformation &bt); void DEREncode(BufferedTransformation &bt) const; + void Save(BufferedTransformation &bt) const + {DEREncode(bt);} + void Load(BufferedTransformation &bt) + {BERDecode(bt);} + Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const; // GeneratibleCryptoMaterial