| 1 | /***************************************************************************** |
| 2 | * md5.h: MD5 hash |
| 3 | ***************************************************************************** |
| 4 | * Copyright © 2004-2011 VLC authors and VideoLAN |
| 5 | * |
| 6 | * Authors: Rémi Denis-Courmont |
| 7 | * Rafaël Carré |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU Lesser General Public License as published by |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU Lesser General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU Lesser General Public License |
| 20 | * along with this program; if not, write to the Free Software Foundation, |
| 21 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
| 22 | *****************************************************************************/ |
| 23 | |
| 24 | #ifndef LIBDVDREAD_MD5_H |
| 25 | #define LIBDVDREAD_MD5_H |
| 26 | |
| 27 | #include <stdint.h> |
| 28 | |
| 29 | /** |
| 30 | * \file |
| 31 | * This file defines functions and structures to compute MD5 digests |
| 32 | */ |
| 33 | |
| 34 | struct md5_s |
| 35 | { |
| 36 | uint32_t A, B, C, D; /* chaining variables */ |
| 37 | uint32_t nblocks; |
| 38 | uint8_t buf[64]; |
| 39 | int count; |
| 40 | }; |
| 41 | |
| 42 | void InitMD5( struct md5_s * ); |
| 43 | void AddMD5( struct md5_s *, const void *, size_t ); |
| 44 | void EndMD5( struct md5_s * ); |
| 45 | |
| 46 | #endif |