Changed argument of digest method and implemented the first operation in main