4898794edd81be5285ea6e544acbedeaeb31bf78 max Tue Nov 23 08:10:57 2021 -0800 Fixing pointers to README file for license in all source code files. refs #27614 diff --git src/lib/hmac.c src/lib/hmac.c index 810e5bd..33d7ded 100644 --- src/lib/hmac.c +++ src/lib/hmac.c @@ -1,24 +1,24 @@ /* Calculate an openssl keyed-hash message authentication code (HMAC) */ // You may use other openssl hash engines. e.g EVP_md5(), EVP_sha224, // EVP_sha512, etc // Be careful of the length of string with the choosen hash engine. // SHA1 needed 20 characters, MD5 needed 16 characters. // Change the length accordingly with your choosen hash engine /* Copyright (C) 2013 The Regents of the University of California - * See README in this or parent directory for licensing information. */ + * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "openssl/hmac.h" #include "openssl/evp.h" #include "common.h" char *hmacSha1(char *key, char *data) /* Calculate a openssl SHA1 keyed-hash message authentication code (HMAC) */ { unsigned char* digest; digest=HMAC(EVP_sha1(), key, strlen(key), (unsigned char*)data, strlen(data), NULL, NULL); char hmacStr[40]; int i; for(i = 0; i < 20; i++) sprintf(&hmacStr[i*2], "%02x", (unsigned int)digest[i]); return cloneStringZ(hmacStr, sizeof(hmacStr));