Authorization base64 encoding is not functioning properly

The crypto module used to create base64 encoding for authorization header is not working.  When arangodb is protected with password all the APIs are failing producing no results.  I've changed the implementation using standard Buffer class.