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

Switch to unified view

a/src/css.h b/src/css.h
1
/*****************************************************************************
1
/*****************************************************************************
2
 * css.h: Structures for DVD authentication and unscrambling
2
 * css.h: Structures for DVD authentification and unscrambling
3
 *****************************************************************************
3
 *****************************************************************************
4
 * Copyright (C) 1999-2001 VideoLAN
4
 * Copyright (C) 1999-2001 VideoLAN
5
 * $Id$
5
 * $Id: css.h,v 1.1 2001/12/22 00:08:13 sam Exp $
6
 *
6
 *
7
 * Author: StĂŠphane Borel <stef@via.ecp.fr>
7
 * Author: Stéphane Borel <stef@via.ecp.fr>
8
 *
8
 *
9
 * based on:
9
 * based on:
10
 *  - css-auth by Derek Fawcus <derek@spider.com>
10
 *  - css-auth by Derek Fawcus <derek@spider.com>
11
 *  - DVD CSS ioctls example program by Andrew T. Veliath <andrewtv@usa.net>
11
 *  - DVD CSS ioctls example program by Andrew T. Veliath <andrewtv@usa.net>
12
 *  - DeCSSPlus by Ethan Hawke
12
 *  - DeCSSPlus by Ethan Hawke
...
...
26
 * along with this program; if not, write to the Free Software
26
 * along with this program; if not, write to the Free Software
27
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
27
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
28
 *****************************************************************************/
28
 *****************************************************************************/
29
#define KEY_SIZE 5
29
#define KEY_SIZE 5
30
30
31
typedef uint8_t dvd_key_t[KEY_SIZE];
31
typedef u8 dvd_key_t[KEY_SIZE];
32
33
typedef struct disc_s
34
{
35
    u8              p_challenge[2*KEY_SIZE];
36
    dvd_key_t       p_key1;
37
    dvd_key_t       p_key2;
38
    dvd_key_t       p_key_check;
39
    u8              i_varient;
40
    u8              p_disc_key[2048];
41
} disc_t;
32
42
33
typedef struct dvd_title_s
43
typedef struct dvd_title_s
34
{
44
{
35
    int                 i_startlb;
45
    int                 i_startlb;
36
    dvd_key_t           p_key;
46
    dvd_key_t           p_key;
37
    struct dvd_title_s *p_next;
47
    struct dvd_title_s *p_next;
38
} dvd_title_t;
48
} dvd_title_t;
39
49
40
typedef struct css_s
50
typedef struct css_s
41
{
51
{
42
    int             i_agid;      /* Current Authenication Grant ID. */
52
    int             i_agid;
43
    dvd_key_t       p_bus_key;   /* Current session key. */
53
    disc_t          disc;
44
    dvd_key_t       p_disc_key;  /* This DVD disc's key. */
54
    dvd_key_t       p_title_key;
45
    dvd_key_t       p_title_key; /* Current title key. */
46
} css_t;
55
} css_t;
47
56
48
/*****************************************************************************
57
/*****************************************************************************
49
 * Prototypes in css.c
58
 * Prototypes in css.c
50
 *****************************************************************************/
59
 *****************************************************************************/
51
int   _dvdcss_test        ( dvdcss_t );
60
int   CSSTest             ( dvdcss_handle );
52
int   _dvdcss_title       ( dvdcss_t, int );
61
int   CSSAuth             ( dvdcss_handle );
53
int   _dvdcss_disckey     ( dvdcss_t );
62
int   CSSGetDiscKey       ( dvdcss_handle );
54
int   _dvdcss_titlekey    ( dvdcss_t, int , dvd_key_t );
63
int   CSSGetTitleKey      ( dvdcss_handle, int );
55
int   _dvdcss_unscramble  ( uint8_t *, uint8_t * );
64
int   CSSDescrambleSector ( u8 * , u8 * );
56
65

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks