diff options
author | lloyd <[email protected]> | 2010-06-22 13:43:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-22 13:43:18 +0000 |
commit | 54bac11c5d4e051f996951feb6a037b1de001329 (patch) | |
tree | 8cfa3b72ae36dcd156c4ab4dae1066ee3e021830 /src/asn1/asn1_int.h | |
parent | 991f744c5a3e9610a2e4af70ae5daeb7a943a38e (diff) | |
parent | 238869aed29c3d703650ce55404929dc7e3f31fb (diff) |
propagate from branch 'net.randombit.botan' (head 647eeb4f4cf8fa4cf487cdc463d48f09fe18658e)
to branch 'net.randombit.botan.c++0x' (head 2539675db91883b11895ddc5244721e93c413321)
Diffstat (limited to 'src/asn1/asn1_int.h')
-rw-r--r-- | src/asn1/asn1_int.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/asn1/asn1_int.h b/src/asn1/asn1_int.h index 3562f692b..cac46190f 100644 --- a/src/asn1/asn1_int.h +++ b/src/asn1/asn1_int.h @@ -56,8 +56,18 @@ enum ASN1_Tag { class BOTAN_DLL ASN1_Object { public: - virtual void encode_into(class DER_Encoder&) const = 0; - virtual void decode_from(class BER_Decoder&) = 0; + /** + * Encode whatever this object is into to + * @param to the DER_Encoder that will be written to + */ + virtual void encode_into(class DER_Encoder& to) const = 0; + + /** + * Decode whatever this object is from from + * @param from the BER_Decoder that will be read from + */ + virtual void decode_from(class BER_Decoder& from) = 0; + virtual ~ASN1_Object() {} }; @@ -80,9 +90,14 @@ class DataSource; namespace ASN1 { -SecureVector<byte> put_in_sequence(const MemoryRegion<byte>&); -std::string to_string(const BER_Object&); -bool maybe_BER(DataSource&); +SecureVector<byte> put_in_sequence(const MemoryRegion<byte>& val); +std::string to_string(const BER_Object& obj); + +/** +* Heuristics tests; is this object possibly BER? +* @param src a data source that will be peeked at but not modified +*/ +bool maybe_BER(DataSource& src); } |