Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 9825acea20b8c1730a908ceb6b6baa6d > files > 236

fpc-doc-3.0.4-6.mga7.armv7hl.rpm

// See some samples in: http://en.wikipedia.org/wiki/Hash-based_message_authentication_code
program hmd5;

{$mode objfpc}{$H+}

uses
  HMAC;

begin
  // for HMAC_MD5("", "") = 0x74e6f7298a9c2d168935f58c001bad88
  WriteLn('Example 1: ', HMACMD5Print(HMACMD5Digest('', '')));
  // for HMAC_MD5("key", "The quick brown fox jumps over the lazy dog") = 0x80070713463e7749b90c2dc24911e275
  WriteLn('Example 2: ', HMACMD5('key', 'The quick brown fox jumps over the lazy dog'));
end.