<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_file(self, fname):
 """read in a file and compute digest"""

        f = open(fname, "rb")
        data = f.read()
        self.update(data)
        f.close()