mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 13:53:59 -07:00
code indent
This commit is contained in:
parent
531ee7734b
commit
720bdb3f96
83 changed files with 6377 additions and 6240 deletions
25
hmacmd5.c
25
hmacmd5.c
|
@ -1,24 +1,24 @@
|
|||
|
||||
/*
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
HMAC MD5 code for use in NTLMv2
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Free Software Foundation
|
||||
51 Franklin Street, Fifth Floor
|
||||
Boston, MA 02110-1335
|
||||
|
@ -34,8 +34,8 @@
|
|||
*/
|
||||
#ifdef LIBOPENSSL
|
||||
|
||||
#include <string.h>
|
||||
#include "hmacmd5.h"
|
||||
#include <string.h>
|
||||
|
||||
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
the rfc 2104 version of hmac_md5 initialisation.
|
||||
***********************************************************************/
|
||||
|
||||
void hmac_md5_init_rfc2104(const unsigned char *key, int32_t key_len, HMACMD5Context * ctx) {
|
||||
void hmac_md5_init_rfc2104(const unsigned char *key, int32_t key_len, HMACMD5Context *ctx) {
|
||||
int32_t i;
|
||||
unsigned char tk[16];
|
||||
|
||||
|
@ -52,7 +52,7 @@ void hmac_md5_init_rfc2104(const unsigned char *key, int32_t key_len, HMACMD5Con
|
|||
MD5_CTX tctx;
|
||||
|
||||
MD5_Init(&tctx);
|
||||
MD5_Update(&tctx, (void *) key, key_len);
|
||||
MD5_Update(&tctx, (void *)key, key_len);
|
||||
MD5_Final(tk, &tctx);
|
||||
|
||||
key = tk;
|
||||
|
@ -79,7 +79,7 @@ void hmac_md5_init_rfc2104(const unsigned char *key, int32_t key_len, HMACMD5Con
|
|||
the microsoft version of hmac_md5 initialisation.
|
||||
***********************************************************************/
|
||||
|
||||
void hmac_md5_init_limK_to_64(const unsigned char *key, int32_t key_len, HMACMD5Context * ctx) {
|
||||
void hmac_md5_init_limK_to_64(const unsigned char *key, int32_t key_len, HMACMD5Context *ctx) {
|
||||
int32_t i;
|
||||
|
||||
/* if key is longer than 64 bytes truncate it */
|
||||
|
@ -107,15 +107,12 @@ void hmac_md5_init_limK_to_64(const unsigned char *key, int32_t key_len, HMACMD5
|
|||
update hmac_md5 "inner" buffer
|
||||
***********************************************************************/
|
||||
|
||||
void hmac_md5_update(const unsigned char *text, int32_t text_len, HMACMD5Context * ctx) {
|
||||
MD5_Update(&ctx->ctx, (void *) text, text_len); /* then text of datagram */
|
||||
}
|
||||
void hmac_md5_update(const unsigned char *text, int32_t text_len, HMACMD5Context *ctx) { MD5_Update(&ctx->ctx, (void *)text, text_len); /* then text of datagram */ }
|
||||
|
||||
/***********************************************************************
|
||||
finish off hmac_md5 "inner" buffer and generate outer one.
|
||||
***********************************************************************/
|
||||
void hmac_md5_final(unsigned char *digest, HMACMD5Context * ctx)
|
||||
{
|
||||
void hmac_md5_final(unsigned char *digest, HMACMD5Context *ctx) {
|
||||
MD5_CTX ctx_o;
|
||||
|
||||
MD5_Final(digest, &ctx->ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue