credential encryptor API and authenticator API refactor