I have wrote out the function:

```
print(hashlib.sha256(hashlib.sha256(Encode(s))).hexdigest())

```

However, there seems to be the following error:

> 
> object supporting the buffer API required
> 
> 
> 

I believe this is because when hashing the second time, the input is not a byte form because it has been already hashed. 

How can I solve this problem and hash a single string two times?