diff options
author | Andreas Huber <andih@google.com> | 2012-04-03 14:19:20 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-04-03 14:19:20 -0700 |
commit | 1bd139a2a68690e80398b70b27ca59550fea0e65 (patch) | |
tree | e3be78f22aa021c4e372409128775c2093d46dae /include/media/ICrypto.h | |
parent | d22da88fd555f1262357c7dcdeface8445e3a012 (diff) | |
download | frameworks_av-1bd139a2a68690e80398b70b27ca59550fea0e65.zip frameworks_av-1bd139a2a68690e80398b70b27ca59550fea0e65.tar.gz frameworks_av-1bd139a2a68690e80398b70b27ca59550fea0e65.tar.bz2 |
New Crypto services talking to the new crypto "HAL".
Change-Id: I69ed31e7a8b4d69d1209d2d516f94d258f072566
related-to-bug: 6275919
Diffstat (limited to 'include/media/ICrypto.h')
-rw-r--r-- | include/media/ICrypto.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/include/media/ICrypto.h b/include/media/ICrypto.h index 916abe0..376c326 100644 --- a/include/media/ICrypto.h +++ b/include/media/ICrypto.h @@ -16,6 +16,7 @@ #include <binder/IInterface.h> #include <media/stagefright/foundation/ABase.h> +#include <media/hardware/CryptoAPI.h> #ifndef ANDROID_ICRYPTO_H_ @@ -26,26 +27,26 @@ namespace android { struct ICrypto : public IInterface { DECLARE_META_INTERFACE(Crypto); - virtual status_t initialize() = 0; - virtual status_t terminate() = 0; + virtual status_t initCheck() const = 0; - virtual status_t setEntitlementKey( - const void *key, size_t keyLength) = 0; + virtual bool isCryptoSchemeSupported(const uint8_t uuid[16]) const = 0; - virtual status_t setEntitlementControlMessage( - const void *msg, size_t msgLength) = 0; + virtual status_t createPlugin( + const uint8_t uuid[16], const void *data, size_t size) = 0; - // "dstData" is in media_server's address space (but inaccessible). - virtual ssize_t decryptVideo( - const void *iv, size_t ivLength, - const void *srcData, size_t srcDataSize, - void *dstData, size_t dstDataOffset) = 0; + virtual status_t destroyPlugin() = 0; - // "dstData" is in the calling process' address space. - virtual ssize_t decryptAudio( - const void *iv, size_t ivLength, - const void *srcData, size_t srcDataSize, - void *dstData, size_t dstDataSize) = 0; + virtual bool requiresSecureDecoderComponent( + const char *mime) const = 0; + + virtual status_t decrypt( + bool secure, + const uint8_t key[16], + const uint8_t iv[16], + CryptoPlugin::Mode mode, + const void *srcPtr, + const CryptoPlugin::SubSample *subSamples, size_t numSubSamples, + void *dstPtr) = 0; private: DISALLOW_EVIL_CONSTRUCTORS(ICrypto); |