| ... | ... |
@@ -25,7 +25,6 @@ |
| 25 | 25 |
#include "avutil.h" |
| 26 | 26 |
#include "bswap.h" |
| 27 | 27 |
#include "sha.h" |
| 28 |
-#include "sha1.h" |
|
| 29 | 28 |
#include "intreadwrite.h" |
| 30 | 29 |
|
| 31 | 30 |
/** hash context */ |
| ... | ... |
@@ -324,29 +323,6 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest) |
| 324 | 324 |
AV_WB32(digest + i*4, ctx->state[i]); |
| 325 | 325 |
} |
| 326 | 326 |
|
| 327 |
-#if LIBAVUTIL_VERSION_MAJOR < 51 |
|
| 328 |
-struct AVSHA1 {
|
|
| 329 |
- AVSHA sha; |
|
| 330 |
-}; |
|
| 331 |
- |
|
| 332 |
-const int av_sha1_size = sizeof(struct AVSHA1); |
|
| 333 |
- |
|
| 334 |
-void av_sha1_init(struct AVSHA1* context) |
|
| 335 |
-{
|
|
| 336 |
- av_sha_init(&context->sha, 160); |
|
| 337 |
-} |
|
| 338 |
- |
|
| 339 |
-void av_sha1_update(struct AVSHA1* context, const uint8_t* data, unsigned int len) |
|
| 340 |
-{
|
|
| 341 |
- av_sha_update(&context->sha, data, len); |
|
| 342 |
-} |
|
| 343 |
- |
|
| 344 |
-void av_sha1_final(struct AVSHA1* context, uint8_t digest[20]) |
|
| 345 |
-{
|
|
| 346 |
- av_sha_final(&context->sha, digest); |
|
| 347 |
-} |
|
| 348 |
-#endif |
|
| 349 |
- |
|
| 350 | 327 |
#ifdef TEST |
| 351 | 328 |
#include <stdio.h> |
| 352 | 329 |
#undef printf |
| 353 | 330 |
deleted file mode 100644 |
| ... | ... |
@@ -1,57 +0,0 @@ |
| 1 |
-/* |
|
| 2 |
- * Copyright (C) 2007 Michael Niedermayer <michaelni@gmx.at> |
|
| 3 |
- * |
|
| 4 |
- * This file is part of Libav. |
|
| 5 |
- * |
|
| 6 |
- * Libav is free software; you can redistribute it and/or |
|
| 7 |
- * modify it under the terms of the GNU Lesser General Public |
|
| 8 |
- * License as published by the Free Software Foundation; either |
|
| 9 |
- * version 2.1 of the License, or (at your option) any later version. |
|
| 10 |
- * |
|
| 11 |
- * Libav is distributed in the hope that it will be useful, |
|
| 12 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 13 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 14 |
- * Lesser General Public License for more details. |
|
| 15 |
- * |
|
| 16 |
- * You should have received a copy of the GNU Lesser General Public |
|
| 17 |
- * License along with Libav; if not, write to the Free Software |
|
| 18 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 19 |
- */ |
|
| 20 |
- |
|
| 21 |
-#ifndef AVUTIL_SHA1_H |
|
| 22 |
-#define AVUTIL_SHA1_H |
|
| 23 |
- |
|
| 24 |
-#include <stdint.h> |
|
| 25 |
- |
|
| 26 |
-extern const int av_sha1_size; |
|
| 27 |
- |
|
| 28 |
-struct AVSHA1; |
|
| 29 |
- |
|
| 30 |
-/** |
|
| 31 |
- * Initialize SHA-1 hashing. |
|
| 32 |
- * |
|
| 33 |
- * @param context pointer to the function context (of size av_sha_size) |
|
| 34 |
- * @deprecated use av_sha_init() instead |
|
| 35 |
- */ |
|
| 36 |
-void av_sha1_init(struct AVSHA1* context); |
|
| 37 |
- |
|
| 38 |
-/** |
|
| 39 |
- * Update hash value. |
|
| 40 |
- * |
|
| 41 |
- * @param context hash function context |
|
| 42 |
- * @param data input data to update hash with |
|
| 43 |
- * @param len input data length |
|
| 44 |
- * @deprecated use av_sha_update() instead |
|
| 45 |
- */ |
|
| 46 |
-void av_sha1_update(struct AVSHA1* context, const uint8_t* data, unsigned int len); |
|
| 47 |
- |
|
| 48 |
-/** |
|
| 49 |
- * Finish hashing and output digest value. |
|
| 50 |
- * |
|
| 51 |
- * @param context hash function context |
|
| 52 |
- * @param digest buffer where output digest value is stored |
|
| 53 |
- * @deprecated use av_sha_final() instead |
|
| 54 |
- */ |
|
| 55 |
-void av_sha1_final(struct AVSHA1* context, uint8_t digest[20]); |
|
| 56 |
- |
|
| 57 |
-#endif /* AVUTIL_SHA1_H */ |