Class Checksum

java.lang.Object
All Implemented Interfaces:
Proxy

@Generated("io.github.jwharm.JavaGI") public class Checksum extends ProxyInstance
GLib provides a generic API for computing checksums (or ‘digests’) for a sequence of arbitrary bytes, using various hashing algorithms like MD5, SHA-1 and SHA-256. Checksums are commonly used in various environments and specifications.

To create a new GChecksum, use Checksum(org.gnome.glib.ChecksumType). To free a GChecksum, use free().

GLib supports incremental checksums using the GChecksum data structure, by calling update(byte[]) as long as there’s data available and then using getString() or getDigest(byte[]) to compute the checksum and return it either as a string in hexadecimal form, or as a raw sequence of bytes. To compute the checksum for binary blobs and nul-terminated strings in one go, use the convenience functions GLib.computeChecksumForData(org.gnome.glib.ChecksumType, byte[]) and GLib.computeChecksumForString(org.gnome.glib.ChecksumType, java.lang.String, long), respectively.