diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_str.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 2be8b7eb64..e4b07a4b73 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -794,6 +794,17 @@ size_t strhex_to_str(char *p, size_t len, const char *strhex) return num_chars; } +DATA_BLOB strhex_to_data_blob(const char *strhex) +{ + DATA_BLOB ret_blob = data_blob(NULL, strlen(strhex)/2+1); + + ret_blob.length = strhex_to_str(ret_blob.data, + strlen(strhex), + strhex); + + return ret_blob; +} + /** * Routine to print a buffer as HEX digits, into an allocated string. */ |