/* * Copyright 2012 Google Inc. All Rights Reserved. */ #ifndef WV_CRYPTO_PLUGIN_H_ #define WV_CRYPTO_PLUGIN_H_ #include "media/stagefright/foundation/ABase.h" #include "media/hardware/CryptoAPI.h" #include "OEMCryptoDASH.h" namespace wvclearkey { class WVCryptoPlugin : public android::CryptoPlugin { public: WVCryptoPlugin(); virtual ~WVCryptoPlugin(); virtual bool requiresSecureDecoderComponent(const char *mime) const { return false; } virtual ssize_t decrypt( bool secure, const uint8_t key[16], const uint8_t iv[16], Mode mode, const void *srcPtr, const SubSample *subSamples, size_t numSubSamples, void *dstPtr, android::AString *errorDetailMsg); private: DISALLOW_EVIL_CONSTRUCTORS(WVCryptoPlugin); OEMCrypto_SESSION mSession; }; } // namespace wvclearkey #endif // WV_CRYPTO_PLUGIN_H_