summaryrefslogtreecommitdiff
path: root/wsutil/sha2.h
diff options
context:
space:
mode:
authorErik de Jong <erikdejong@gmail.com>2017-02-13 19:31:26 +0100
committerPeter Wu <peter@lekensteyn.nl>2017-03-02 23:58:05 +0000
commitf1c75cf6ef7e9f9de1ec7fd798df941b972ec71c (patch)
tree7d7c2f66bf7595e010026d6f4d3b3a53175af824 /wsutil/sha2.h
parent4bd3c4d44ddcdf8e98fdf08a425e3a68e9b18395 (diff)
downloadwireshark-f1c75cf6ef7e9f9de1ec7fd798df941b972ec71c.tar.gz
Rewrite dissectors to use Libgcrypt functions.
As discussed on the mailinglist, rewriting dissectors to use Libgcrypt functions as Libgcrypt will be mandatory after change 20030. Removal of following functions: - crypt_md4 - crypt_rc4* - aes_cmac_encrypt_* - md5_* - sha1_* - sha256_* Further candidates: - aes_* - rijndael_* - ... Added functions: - ws_hmac_buffer Added const macros: - HASH_MD5_LENGTH - HASH_SHA1_LENGTH Changes on epan/crypt/* verified with captures from https://wiki.wireshark.org/HowToDecrypt802.11 Changes on packet-snmp.c and packet-radius.c verified with captures from https://wiki.wireshark.org/SampleCapture Changes on packet-tacacs.c verified with capture from http://ccie-in-3-months.blogspot.nl/2009/04/decoding-login-credentials-regardless.html Change-Id: Iea6ba2bf207cf0f1bf2117068fb1abcfeaafaa46 Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html Reviewed-on: https://code.wireshark.org/review/20095 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'wsutil/sha2.h')
-rw-r--r--wsutil/sha2.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/wsutil/sha2.h b/wsutil/sha2.h
deleted file mode 100644
index baca2233c1..0000000000
--- a/wsutil/sha2.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * FIPS-180-2 compliant SHA-2 implementation (only sha256 so far)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
- */
-
-#ifndef _SHA2_H
-#define _SHA2_H
-
-#include "ws_symbol_export.h"
-
-#define SHA256_DIGEST_LEN 32
-#define SHA256_BLOCK_SIZE 64
-
-typedef struct
-{
- guint64 total;
- guint32 state[8];
- guint8 buffer[SHA256_BLOCK_SIZE];
-}
- sha256_context;
-
-WS_DLL_PUBLIC
-void sha256_starts( sha256_context *ctx );
-WS_DLL_PUBLIC
-void sha256_update( sha256_context *ctx, const guint8 *input, guint32 length );
-WS_DLL_PUBLIC
-void sha256_finish( sha256_context *ctx, guint8 digest[SHA256_DIGEST_LEN] );
-
-
-typedef struct {
- sha256_context ctx;
- guint8 k_opad[SHA256_BLOCK_SIZE];
-}
- sha256_hmac_context;
-
-WS_DLL_PUBLIC
-void sha256_hmac_starts( sha256_hmac_context *hctx, const guint8 *key, guint32 keylen );
-WS_DLL_PUBLIC
-void sha256_hmac_update( sha256_hmac_context *hctx, const guint8 *buf, guint32 buflen );
-WS_DLL_PUBLIC
-void sha256_hmac_finish( sha256_hmac_context *hctx, guint8 digest[SHA256_DIGEST_LEN] );
-WS_DLL_PUBLIC
-void sha256_hmac( const guint8 *key, guint32 keylen, const guint8 *buf, guint32 buflen,
- guint8 digest[SHA256_DIGEST_LEN] );
-
-
-
-#endif /* _SHA2_H */
-
-/*
- * Editor modelines - http://www.wireshark.org/tools/modelines.html
- *
- * Local variables:
- * c-basic-offset: 4
- * tab-width: 8
- * indent-tabs-mode: nil
- * End:
- *
- * vi: set shiftwidth=4 tabstop=8 expandtab:
- * :indentSize=4:tabSize=8:noTabs=true:
- */