[libdvdnav-devel] [PATCH] src/md5: Replace the MD5 implementation

Steve Dibb beandog at gentoo.org
Thu Nov 6 17:57:20 CET 2014


On 11/05/2014 02:36 PM, Andrew Clayton wrote:

> Finally DVDDiscID() in src/dvd_reader.c was changed to make use of this
> new implementation. I tested this with the following program
>
>      /*
>       * gcc -O2 -Wall -o dvddiscid dvddiscid.c -ldvdread
>       */
>
>      #include <stdio.h>
>
>      #include <dvdread/dvd_reader.h>
>
>      int main(void)
>      {
>          int i;
>          dvd_reader_t *dvd;
>          unsigned char id[16];
>
>          dvd = DVDOpen("/dev/sr0");
>          DVDDiscID(dvd, id);
>          DVDClose(dvd);
>
>          for (i = 0; i < 16; i++)
>               printf("%.2x", id[i]);
>          printf("\n");
>
>          return 0;
>      }
>
> and get the same MD5 before and after this change.
>
>      $ ./dvddiscid
>      a02f30eb3e76e624b766ec0248757901
>
>      $ LD_LIBRARY_PATH=/opt/libdvdread/lib ./dvddiscid
>      a02f30eb3e76e624b766ec0248757901
>

I rely heavily on this one working right, so I tested it on a couple hundred DVDs.  No regressions. :)

Steve



More information about the libdvdnav-devel mailing list