SAML objects in progress.
[shibboleth/cpp-opensaml.git] / saml / SAMLConfig.h
index ec74921..2b3540f 100644 (file)
@@ -24,6 +24,8 @@
 #define __saml_config_h__\r
 \r
 #include <saml/base.h>\r
+#include <xmltooling/unicode.h>\r
+#include <string>\r
 \r
 /**\r
  * @namespace opensaml\r
@@ -64,6 +66,30 @@ namespace opensaml {
          * before terminating itself\r
          */\r
         virtual void term()=0;\r
+        \r
+        /**\r
+         * Generate random information using the underlying security library\r
+         * \r
+         * @param buf   buffer for the information\r
+         * @param len   number of bytes to write into buffer\r
+         */\r
+        virtual void generateRandomBytes(void* buf, unsigned int len)=0;\r
+\r
+        /**\r
+         * Generate random information using the underlying security library\r
+         * \r
+         * @param buf   string buffer for the information\r
+         * @param len   number of bytes to write into buffer\r
+         */\r
+        virtual void generateRandomBytes(std::string& buf, unsigned int len)=0;\r
+\r
+        /**\r
+         * Generate a valid XML identifier of the form _X{32} where X is a\r
+         * random hex character. The caller is responsible for freeing the result.\r
+         * \r
+         * @return a valid null-terminated XML ID\r
+         */\r
+        virtual XMLCh* generateIdentifier()=0;\r
 \r
     protected:\r
         SAMLConfig() {}\r