code: def set_file_chksum(self, doc, chk_sum):
          
          if self.has_package(doc) and self.has_file(doc):
              if not self.file_chksum_set:
                  self.file_chksum_set = True
                  self.file(doc).chk_sum = checksum.Algorithm('SHA1', chk_sum)
                  return True
              else:
                  raise CardinalityError('File::CheckSum')
          else:
              raise OrderError('File::CheckSum')
docs: Sets the file check sum, if not already set.
          chk_sum - A string
          Raises CardinalityError if already defined.
          Raises OrderError if no package previously defined.