diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-23 19:37:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-23 19:37:22 +0300 |
commit | 3a5a00dd6d1d0d0d0ff9c882faf1a8d958469323 (patch) | |
tree | 2694982e38ee0237e589a9479e11357a06537229 | |
parent | 105158e0a4b2c23adb154e298aac9e10b665b18b (diff) |
we don't need this function, cause it's not called, and also we have openssl
-rw-r--r-- | include/m_core.h | 2 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 322966 -> 322740 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 324052 -> 323850 bytes | |||
-rw-r--r-- | src/mir_core/src/mir_core.def | 1 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 1 | ||||
-rw-r--r-- | src/mir_core/src/sha256.cpp | 31 |
6 files changed, 0 insertions, 35 deletions
diff --git a/include/m_core.h b/include/m_core.h index ec51cac5a8..64cb936986 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -381,8 +381,6 @@ MIR_CORE_DLL(void) mir_sha256_write(SHA256_CONTEXT *ctx, const void *dataIn, siz MIR_CORE_DLL(void) mir_sha256_final(SHA256_CONTEXT *ctx, BYTE hashout[MIR_SHA256_HASH_SIZE]);
MIR_CORE_DLL(void) mir_sha256_hash(const void *dataIn, size_t len, BYTE hashout[MIR_SHA256_HASH_SIZE]);
-MIR_CORE_DLL(void) mir_hmac_sha256(BYTE hashout[MIR_SHA256_HASH_SIZE], const BYTE *key, size_t keylen, const BYTE *text, size_t textlen);
-
///////////////////////////////////////////////////////////////////////////////
// strings
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex ab262cf593..bf09e5def3 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex 1ce32c8d63..3e0ebc2eb5 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 1b50cfafc5..f2cd22e6d2 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -958,7 +958,6 @@ mir_sha256_write @1147 mir_forkthreadowner @1148
hex2bin @1149
hex2binW @1150
-mir_hmac_sha256 @1151
Utf8toUcs2 @1152
db_add_contact @1153
db_delete_contact @1154
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index f43d9b35ed..4b454ab756 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -958,7 +958,6 @@ mir_sha256_write @1147 mir_forkthreadowner @1148
hex2bin @1149
hex2binW @1150
-mir_hmac_sha256 @1151
Utf8toUcs2 @1152
db_add_contact @1153
db_delete_contact @1154
diff --git a/src/mir_core/src/sha256.cpp b/src/mir_core/src/sha256.cpp index 69821977e4..e3e5991f5f 100644 --- a/src/mir_core/src/sha256.cpp +++ b/src/mir_core/src/sha256.cpp @@ -287,34 +287,3 @@ MIR_CORE_DLL(void) mir_sha256_hash(const void *dataIn, size_t len, BYTE hashout[ mir_sha256_write(&tmp, dataIn, len);
mir_sha256_final(&tmp, hashout);
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-MIR_CORE_DLL(void) mir_hmac_sha256(BYTE hashout[MIR_SHA256_HASH_SIZE], const BYTE *key, size_t keylen, const BYTE *text, size_t textlen)
-{
- SHA256_CONTEXT ctx;
- BYTE usedKey[MIR_SHA_BLOCKSIZE] = { 0 };
-
- if (keylen > MIR_SHA_BLOCKSIZE) {
- mir_sha256_init(&ctx);
- mir_sha256_write(&ctx, key, (int)keylen);
- mir_sha256_final(&ctx, usedKey);
- }
- else memcpy(usedKey, key, keylen);
-
- for (size_t i = 0; i < MIR_SHA_BLOCKSIZE; i++)
- usedKey[i] ^= 0x36;
-
- mir_sha256_init(&ctx);
- mir_sha256_write(&ctx, usedKey, MIR_SHA_BLOCKSIZE);
- mir_sha256_write(&ctx, text, textlen);
- mir_sha256_final(&ctx, hashout);
-
- for (size_t i = 0; i < MIR_SHA_BLOCKSIZE; i++)
- usedKey[i] ^= 0x5C ^ 0x36;
-
- mir_sha256_init(&ctx);
- mir_sha256_write(&ctx, usedKey, MIR_SHA_BLOCKSIZE);
- mir_sha256_write(&ctx, hashout, MIR_SHA256_HASH_SIZE);
- mir_sha256_final(&ctx, hashout);
-}
|