#!/usr/bin/python3
# ovirt-imageio
# Copyright (C) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

"""
Show how to compute disk image checksum.
"""
import sys
from ovirt_imageio import client

path = sys.argv[1]
res = client.checksum(path, algorithm="sha256")
print(f"{res['checksum']}  {path}")
