| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bsettop_cipher.c $ |
|---|
| 11 | * $brcm_Revision: 2 $ |
|---|
| 12 | * $brcm_Date: 3/25/08 10:13a $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /BSEAV/api/src/nexus/bsettop_cipher.c $ |
|---|
| 19 | * |
|---|
| 20 | * 2 3/25/08 10:13a jgarrett |
|---|
| 21 | * PR 40857: Implementing stubs |
|---|
| 22 | * |
|---|
| 23 | *************************************************************************/ |
|---|
| 24 | |
|---|
| 25 | #include "bsettop_impl.h" |
|---|
| 26 | |
|---|
| 27 | BDBG_MODULE(cipher); |
|---|
| 28 | |
|---|
| 29 | /* |
|---|
| 30 | Summary: |
|---|
| 31 | Open a cipher handle. |
|---|
| 32 | */ |
|---|
| 33 | bcipher_t bcipher_open( |
|---|
| 34 | bobject_t id |
|---|
| 35 | ) |
|---|
| 36 | { |
|---|
| 37 | bresult rc; |
|---|
| 38 | /* Not supported on post-7038 platforms */ |
|---|
| 39 | BSTD_UNUSED(id); |
|---|
| 40 | rc = BSETTOP_ERROR(berr_not_supported); |
|---|
| 41 | return NULL; |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | /* |
|---|
| 45 | Summary: |
|---|
| 46 | Close a cipher handle. |
|---|
| 47 | */ |
|---|
| 48 | void bcipher_close(bcipher_t encrypt) |
|---|
| 49 | { |
|---|
| 50 | BSTD_UNUSED(encrypt); |
|---|
| 51 | } |
|---|
| 52 | |
|---|
| 53 | /* |
|---|
| 54 | Summary: |
|---|
| 55 | Required to initialize bcipher_settings. |
|---|
| 56 | */ |
|---|
| 57 | void bcipher_settings_init( |
|---|
| 58 | bcipher_settings *settings, /* [out] structure to be initialized */ |
|---|
| 59 | bcipher_t cipher /* Cipher handle if there are resource-specific defaults */ |
|---|
| 60 | ) |
|---|
| 61 | { |
|---|
| 62 | BSTD_UNUSED(settings); |
|---|
| 63 | BSTD_UNUSED(cipher); |
|---|
| 64 | } |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | /* |
|---|
| 68 | Summary: |
|---|
| 69 | Encrypt or decrypt a buffer of data using the PVR encryption block. |
|---|
| 70 | */ |
|---|
| 71 | bresult |
|---|
| 72 | bcipher_convert_data( |
|---|
| 73 | bcipher_t handle, /* handle returned by bcipher_open() */ |
|---|
| 74 | void *dest, /* [out,size_is(datalen)] data to be converted */ |
|---|
| 75 | const void *source, /* [size_is(datalen)] data to be converted */ |
|---|
| 76 | size_t datalen, /* length of data in bytes to be converted */ |
|---|
| 77 | const bcipher_settings *settings /* settings which control the type of encryption |
|---|
| 78 | or decryption. */ |
|---|
| 79 | ) |
|---|
| 80 | { |
|---|
| 81 | BSTD_UNUSED(handle); |
|---|
| 82 | BSTD_UNUSED(dest); |
|---|
| 83 | BSTD_UNUSED(source); |
|---|
| 84 | BSTD_UNUSED(datalen); |
|---|
| 85 | BSTD_UNUSED(settings); |
|---|
| 86 | return BSETTOP_ERROR(berr_not_supported); |
|---|
| 87 | } |
|---|
| 88 | |
|---|