import sha data = "It's just data" md = sha.new() md.update(data) print md.hexdigest()