diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-09-29 23:28:30 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-09-29 23:28:30 -0400 |
commit | d850788574e68742bd936e6a026c62c1839abaab (patch) | |
tree | 76a3f9727c7c77c1c0ebf86d92f1ec26e8036373 /asn.h | |
parent | db22c6ce50cb5e3900acc24695c2055ccc51e930 (diff) | |
download | cryptopp-git-d850788574e68742bd936e6a026c62c1839abaab.tar.gz |
Add DEREncodeTextString overload
Diffstat (limited to 'asn.h')
-rw-r--r-- | asn.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -134,8 +134,24 @@ CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeOctetString(BufferedTransformation &bt /// \param asnTag the ASN.1 type
/// \returns the number of octets used for the encoding
/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
+CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const byte* str, size_t strLen, byte asnTag);
+
+/// \brief DER encode text string
+/// \param bt BufferedTransformation object for writing
+/// \param str the string to encode
+/// \param asnTag the ASN.1 type
+/// \returns the number of octets used for the encoding
+/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const SecByteBlock &str, byte asnTag);
+/// \brief DER encode text string
+/// \param bt BufferedTransformation object for writing
+/// \param str the string to encode
+/// \param asnTag the ASN.1 type
+/// \returns the number of octets used for the encoding
+/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
+CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const std::string &str, byte asnTag);
+
/// \brief BER decode text string
/// \param bt BufferedTransformation object for reading
/// \param str the string to decode
|