use SHA2 function and move config to dotenv file