Question: Is it possible to represent an unsigned character array as a string?

When I searched for it, I found out that only memset() was able to do this (But character by character).
Assuming that is not the correct way, is there a way to do the conversion?

Context: I am trying to store the output of a cryptographic hash function which happens to be an array of unsigned characters.  

eg: 

```
unsigned char data[N]; ...
for(i=0;i<N;i++) printf("%x",data[i]);

```

My goal is to represent the data as a String (%s) rather than access it by each element. Since I need the output of the hash as a String for further processing. 

Thanks!

Answer: 
I successfully use this to convert unsigned char array to std:string

```
unsigned char array[128];
std::stringstream buffer;
for (int i = 0; i < 128; i++)
    {
        buffer << std::hex << std::setfill('0');
        buffer << std::setw(2)  << static_cast<unsigned>(array[i]);
    }
std::string hexString = buffer.str();

```
An example as you've asked:

unsigned char arr [SIZE];