Merge "Remove unused openssl-devel dependency" into tizen
[platform/upstream/iotivity.git] / resource / c_common / ocrandom / include / ocrandom.h
index 7a91dea..a531c70 100644 (file)
@@ -67,6 +67,12 @@ uint32_t OCGetRandom();
 uint8_t OCGetRandomByte(void);
 
 /**
+ * Generate a uniformly [0,2^16] distributed random number
+ * @retval On Success, it returns the random value, otherwise -1 for error.
+ */
+uint16_t OCGetRandomTwoByte(void);
+
+/**
  * Generate a uniformly distributed 8-bit (byte) array random numbers
  * @param[out] location
  *              memory location to start filling with random bytes
@@ -124,6 +130,19 @@ OCRandomUuidResult OCGenerateUuidString(char uuidString[UUID_STRING_SIZE]);
 OCRandomUuidResult OCConvertUuidToString(const uint8_t uuid[UUID_SIZE],
         char uuidString[UUID_STRING_SIZE]);
 
+/**
+ * Convert a C style string to a UUID based on RFC 4122
+ *
+ * @param[in] uuidString
+ *              a 37 byte length string to fill with the string
+ *              representation of the passed UUID.
+ * @param[out]  uuid
+ *              The 16 byte array filled with UUID data
+ * @retval RAND_UUID_OK for success, otherwise an error value
+ */
+OCRandomUuidResult OCConvertStringToUuid(const char uuidString[UUID_STRING_SIZE],
+                                         uint8_t uuid[UUID_SIZE]);
+
 #ifdef __cplusplus
 }
 #endif