Do not encode key if it is a buffer in `key`.

Closes #21.