Use [glib.checksum.Checksum.free] to free the memory allocated by it.
Checksum.this
(glib.types.ChecksumType checksumType)Creates a new #GChecksum, using the checksum algorithm checksum_type. If the checksum_type is not known, null is returned. A #GChecksum can be used to compute the checksum, or digest, of an arbitrary binary blob, using different hashing algorithms.
A #GChecksum works by feeding a binary blob through [glib.checksum.Checksum.update] until there is data to be checked; the digest can then be extracted using [glib.checksum.Checksum.getString], which will return the checksum as a hexadecimal string; or [glib.checksum.Checksum.getDigest], which will return a vector of raw bytes. Once either [glib.checksum.Checksum.getString] or [glib.checksum.Checksum.getDigest] have been called on a #GChecksum, the checksum will be closed and it won't be possible to call [glib.checksum.Checksum.update] on it anymore.
Parameters
checksumType | the desired type of checksum |