summaryrefslogtreecommitdiff
path: root/rw.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2013-01-26 20:39:50 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2013-01-26 20:39:50 +0000
commite092bbbfa2cd506c7c60f96f58271cc071b546d2 (patch)
tree13d225fe25a0c3e8613d67f85b3d5da108efb12d /rw.h
parent063712487923b5a32eeb1be70f9c95398ec968e3 (diff)
downloadcryptopp-e092bbbfa2cd506c7c60f96f58271cc071b546d2.tar.gz
add Save/Load
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@540 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'rw.h')
-rw-r--r--rw.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/rw.h b/rw.h
index ec8b850..6820251 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