// // Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary // source code may only be used and distributed under the Widevine License // Agreement. // #ifndef WV_GENERIC_CRYPTO_INTERFACE_H_ #define WV_GENERIC_CRYPTO_INTERFACE_H_ #include #include #include "OEMCryptoCENC.h" #include "media/stagefright/foundation/ABase.h" namespace wvdrm { class WVGenericCryptoInterface { public: WVGenericCryptoInterface() {} virtual ~WVGenericCryptoInterface() {} virtual OEMCryptoResult signRSA(const uint8_t* wrapped_rsa_key, size_t wrapped_rsa_key_length, const uint8_t* message, size_t message_length, std::vector& signature, RSA_Padding_Scheme padding_scheme); virtual OEMCryptoResult loadDeviceRSAKey(OEMCrypto_SESSION session, const uint8_t* wrapped_rsa_key, size_t wrapped_rsa_key_length) { return OEMCrypto_LoadDRMPrivateKey(session, OEMCrypto_RSA_Private_Key, wrapped_rsa_key, wrapped_rsa_key_length); } private: DISALLOW_EVIL_CONSTRUCTORS(WVGenericCryptoInterface); }; } // namespace wvdrm #endif // WV_GENERIC_CRYPTO_INTERFACE_H_