Klasse Hmac

Alle implementierten Schnittstellen:
PointerInterface

public class Hmac extends Record
HMACs should be used when producing a cookie or hash based on data
and a key. Simple mechanisms for using SHA1 and other algorithms to
digest a key and data together are vulnerable to various security
issues.
[HMAC](http://en.wikipedia.org/wiki/HMAC)
uses algorithms like SHA1 in a secure way to produce a digest of a
key and data.

Both the key and data are arbitrary byte arrays of bytes or characters.

Support for HMAC Digests has been added in GLib 2.30, and support for SHA-512
in GLib 2.42. Support for SHA-384 was added in GLib 2.52.

To create a new `GHmac`, use [ctor@GLib.Hmac.new]. To free a `GHmac`, use
[method@GLib.Hmac.unref].

https://docs.gtk.org/glib/struct.Hmac.html

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • copy

      public Hmac copy()
      Copies a #GHmac. If @hmac has been closed, by calling
      g_hmac_get_string() or g_hmac_get_digest(), the copied
      HMAC will be closed as well.
      Gibt zurück:
      the copy of the passed #GHmac. Use g_hmac_unref() when finished using it.
    • getString

      public Str getString()
      Gets the HMAC as a hexadecimal string.

      Once this function has been called the #GHmac can no longer be
      updated with g_hmac_update().

      The hexadecimal characters will be lower case.
      Gibt zurück:
      the hexadecimal representation of the HMAC. The returned string is owned by the HMAC and should not be modified or freed.
    • ref

      public Hmac ref()
      Atomically increments the reference count of @hmac by one.

      This function is MT-safe and may be called from any thread.
      Gibt zurück:
      the passed in #GHmac.
    • unref

      public void unref()
      Atomically decrements the reference count of @hmac by one.

      If the reference count drops to 0, all keys and values will be
      destroyed, and all memory allocated by the hash table is released.
      This function is MT-safe and may be called from any thread.
      Frees the memory allocated for @hmac.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()