Andreas Huber | 90d3ed9 | 2010-05-25 11:35:35 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2010 The VP8 project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license and patent |
| 5 | * grant that can be found in the LICENSE file in the root of the source |
| 6 | * tree. All contributing project authors may be found in the AUTHORS |
| 7 | * file in the root of the source tree. |
| 8 | */ |
| 9 | |
| 10 | /* |
| 11 | Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
| 12 | rights reserved. |
| 13 | |
| 14 | License to copy and use this software is granted provided that it |
| 15 | is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
| 16 | Algorithm" in all material mentioning or referencing this software |
| 17 | or this function. |
| 18 | |
| 19 | License is also granted to make and use derivative works provided |
| 20 | that such works are identified as "derived from the RSA Data |
| 21 | Security, Inc. MD5 Message-Digest Algorithm" in all material |
| 22 | mentioning or referencing the derived work. |
| 23 | |
| 24 | RSA Data Security, Inc. makes no representations concerning either |
| 25 | the merchantability of this software or the suitability of this |
| 26 | software for any particular purpose. It is provided "as is" |
| 27 | without express or implied warranty of any kind. |
| 28 | |
| 29 | These notices must be retained in any copies of any part of this |
| 30 | documentation and/or software. |
| 31 | */ |
| 32 | #ifndef HAVE_VPX_PORTS |
| 33 | #define HAVE_VPX_PORTS 0 |
| 34 | #endif |
| 35 | #if HAVE_VPX_PORTS |
| 36 | #include "vpx_ports/vpx_integer.h" |
| 37 | #else |
| 38 | #include "vpx_integer.h" |
| 39 | #endif |
| 40 | |
| 41 | /* MD5 context. */ |
| 42 | typedef struct |
| 43 | { |
| 44 | uint32_t state[4]; /* state (ABCD) */ |
| 45 | uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
| 46 | uint8_t buffer[64]; /* input buffer */ |
| 47 | } md5_ctx_t; |
| 48 | |
| 49 | void md5_init(md5_ctx_t *ctx); |
| 50 | void md5_update(md5_ctx_t *ctx, const uint8_t *buf, unsigned int len); |
| 51 | void md5_finalize(md5_ctx_t *ctx, uint8_t md5[16]); |