Diff of /src/css.h [104348] .. [d040ac] Maximize Restore

  Switch to side-by-side view

--- a/src/css.h
+++ b/src/css.h
@@ -1,10 +1,10 @@
 /*****************************************************************************
- * css.h: Structures for DVD authentication and unscrambling
+ * css.h: Structures for DVD authentification and unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id$
+ * $Id: css.h,v 1.1 2001/12/22 00:08:13 sam Exp $
  *
- * Author: StĂŠphane Borel <stef@via.ecp.fr>
+ * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  * based on:
  *  - css-auth by Derek Fawcus <derek@spider.com>
@@ -28,7 +28,17 @@
  *****************************************************************************/
 #define KEY_SIZE 5
 
-typedef uint8_t dvd_key_t[KEY_SIZE];
+typedef u8 dvd_key_t[KEY_SIZE];
+
+typedef struct disc_s
+{
+    u8              p_challenge[2*KEY_SIZE];
+    dvd_key_t       p_key1;
+    dvd_key_t       p_key2;
+    dvd_key_t       p_key_check;
+    u8              i_varient;
+    u8              p_disc_key[2048];
+} disc_t;
 
 typedef struct dvd_title_s
 {
@@ -39,18 +49,17 @@
 
 typedef struct css_s
 {
-    int             i_agid;      /* Current Authenication Grant ID. */
-    dvd_key_t       p_bus_key;   /* Current session key. */
-    dvd_key_t       p_disc_key;  /* This DVD disc's key. */
-    dvd_key_t       p_title_key; /* Current title key. */
+    int             i_agid;
+    disc_t          disc;
+    dvd_key_t       p_title_key;
 } css_t;
 
 /*****************************************************************************
  * Prototypes in css.c
  *****************************************************************************/
-int   _dvdcss_test        ( dvdcss_t );
-int   _dvdcss_title       ( dvdcss_t, int );
-int   _dvdcss_disckey     ( dvdcss_t );
-int   _dvdcss_titlekey    ( dvdcss_t, int , dvd_key_t );
-int   _dvdcss_unscramble  ( uint8_t *, uint8_t * );
+int   CSSTest             ( dvdcss_handle );
+int   CSSAuth             ( dvdcss_handle );
+int   CSSGetDiscKey       ( dvdcss_handle );
+int   CSSGetTitleKey      ( dvdcss_handle, int );
+int   CSSDescrambleSector ( u8 * , u8 * );