summaryrefslogtreecommitdiff
path: root/asn.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-09-29 23:28:30 -0400
committerJeffrey Walton <noloader@gmail.com>2019-09-29 23:28:30 -0400
commitd850788574e68742bd936e6a026c62c1839abaab (patch)
tree76a3f9727c7c77c1c0ebf86d92f1ec26e8036373 /asn.h
parentdb22c6ce50cb5e3900acc24695c2055ccc51e930 (diff)
downloadcryptopp-git-d850788574e68742bd936e6a026c62c1839abaab.tar.gz
Add DEREncodeTextString overload
Diffstat (limited to 'asn.h')
-rw-r--r--asn.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/asn.h b/asn.h
index d6bf2f44..bce89156 100644
--- a/asn.h
+++ b/asn.h
@@ -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