Shaka Player Embedded
Classes | Public Member Functions | List of all members
shaka::util::Decryptor Class Reference

#include <decryptor.h>

Classes

struct  Impl
 

Public Member Functions

 Decryptor (eme::EncryptionScheme scheme, const std::vector< uint8_t > &key, const std::vector< uint8_t > &iv)
 
 ~Decryptor ()
 
 SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE (Decryptor)
 
bool DecryptPartialBlock (const uint8_t *data, size_t data_size, uint32_t block_offset, uint8_t *dest)
 
bool Decrypt (const uint8_t *data, size_t data_size, uint8_t *dest)
 

Detailed Description

A utility class that decrypts data. This stores the current decryption state so it can be reused for a single decrypt operation. This will only succeed if all the data is decrypted, meaning for CBC, a whole AES block needs to be given. It is assumed the output is at least the same size as the input.

Definition at line 35 of file decryptor.h.

Constructor & Destructor Documentation

§ Decryptor()

shaka::util::Decryptor::Decryptor ( eme::EncryptionScheme  scheme,
const std::vector< uint8_t > &  key,
const std::vector< uint8_t > &  iv 
)

Definition at line 38 of file decryptor_darwin.cc.

§ ~Decryptor()

shaka::util::Decryptor::~Decryptor ( )

Definition at line 46 of file decryptor_darwin.cc.

Member Function Documentation

§ Decrypt()

bool shaka::util::Decryptor::Decrypt ( const uint8_t *  data,
size_t  data_size,
uint8_t *  dest 
)

Decrypts the given data into the given buffer. This data size must be a multiple of AES_BLOCK_SIZE.

Definition at line 113 of file decryptor_darwin.cc.

§ DecryptPartialBlock()

bool shaka::util::Decryptor::DecryptPartialBlock ( const uint8_t *  data,
size_t  data_size,
uint32_t  block_offset,
uint8_t *  dest 
)

Decrypts the given partial block into the given buffer. This must be given a partial block and |data_size + block_offset <= AES_BLOCK_SIZE|.

Definition at line 48 of file decryptor_darwin.cc.

§ SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE()

shaka::util::Decryptor::SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE ( Decryptor  )

The documentation for this class was generated from the following files: