A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 54 lines 2.1 kB view raw
1/***************************************************************************** 2 * vlc_md5.h: MD5 hash 3 ***************************************************************************** 4 * Copyright (C) 2004-2005 the VideoLAN team 5 * $Id$ 6 * 7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 8 * Sam Hocevar <sam@zoy.org> 9 * 10 * Adapted to Rockbox by: Antoine Cellerier <dionoea at videolan dot org> 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; either version 2 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program; if not, write to the Free Software 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 25 *****************************************************************************/ 26 27#ifndef _VLC_MD5_H 28# define _VLC_MD5_H 29 30/***************************************************************************** 31 * md5_s: MD5 message structure 32 ***************************************************************************** 33 * This structure stores the static information needed to compute an MD5 34 * hash. It has an extra data buffer to allow non-aligned writes. 35 *****************************************************************************/ 36struct md5_s 37{ 38 uint64_t i_bits; /* Total written bits */ 39 uint32_t p_digest[4]; /* The MD5 digest */ 40 uint32_t p_data[16]; /* Buffer to cache non-aligned writes */ 41}; 42 43void InitMD5( struct md5_s * ); 44void AddMD5( struct md5_s *, const void *, size_t ); 45void EndMD5( struct md5_s * ); 46 47/** 48 * Returns a char representation of the md5 hash, as shown by UNIX md5 or 49 * md5sum tools. 50 */ 51#define MD5_STRING_LENGTH 32 52void psz_md5_hash( char *, struct md5_s * ); 53 54#endif