d1a981bb7c1003f04a3546face066b13d9fe6aee
[profile/ivi/libvpx.git] / md5_utils.h
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 
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may 
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10
11 /*
12 Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
13 rights reserved.
14
15 License to copy and use this software is granted provided that it
16 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
17 Algorithm" in all material mentioning or referencing this software
18 or this function.
19
20 License is also granted to make and use derivative works provided
21 that such works are identified as "derived from the RSA Data
22 Security, Inc. MD5 Message-Digest Algorithm" in all material
23 mentioning or referencing the derived work.
24
25 RSA Data Security, Inc. makes no representations concerning either
26 the merchantability of this software or the suitability of this
27 software for any particular purpose. It is provided "as is"
28 without express or implied warranty of any kind.
29
30 These notices must be retained in any copies of any part of this
31 documentation and/or software.
32 */
33 #include "vpx/vpx_integer.h"
34
35 /* MD5 context. */
36 typedef struct
37 {
38     uint32_t state[4];        /* state (ABCD) */
39     uint32_t count[2];        /* number of bits, modulo 2^64 (lsb first) */
40     uint8_t  buffer[64];      /* input buffer */
41 } md5_ctx_t;
42
43 void md5_init(md5_ctx_t *ctx);
44 void md5_update(md5_ctx_t *ctx, const uint8_t *buf, unsigned int len);
45 void md5_finalize(md5_ctx_t *ctx, uint8_t md5[16]);