116dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce/* 216dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * Copyright (C) 2014 The Android Open Source Project 316dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * 416dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * Licensed under the Apache License, Version 2.0 (the "License"); 516dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * you may not use this file except in compliance with the License. 616dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * You may obtain a copy of the License at 716dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * 816dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * http://www.apache.org/licenses/LICENSE-2.0 916dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * 1016dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * Unless required by applicable law or agreed to in writing, software 1116dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * distributed under the License is distributed on an "AS IS" BASIS, 1216dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1316dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * See the License for the specific language governing permissions and 1416dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce * limitations under the License. 1516dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce */ 1616dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 1716dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#ifndef CLEARKEY_AES_CTR_DECRYPTOR_H_ 1816dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#define CLEARKEY_AES_CTR_DECRYPTOR_H_ 1916dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 2016dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#include <media/stagefright/foundation/ABase.h> 2116dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#include <Utils.h> 2216dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#include <utils/Errors.h> 2316dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#include <utils/Vector.h> 2416dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 2516dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#include "ClearKeyTypes.h" 2616dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 2716dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Brucenamespace clearkeydrm { 2816dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 2916dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruceclass AesCtrDecryptor { 3016dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Brucepublic: 3116dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce AesCtrDecryptor() {} 3216dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 3316dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce android::status_t decrypt(const android::Vector<uint8_t>& key, const Iv iv, 3416dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce const uint8_t* source, uint8_t* destination, 3516dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce const SubSample* subSamples, size_t numSubSamples, 3616dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce size_t* bytesDecryptedOut); 3716dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 3816dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruceprivate: 3916dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce DISALLOW_EVIL_CONSTRUCTORS(AesCtrDecryptor); 4016dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce}; 4116dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 4216dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce} // namespace clearkeydrm 4316dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce 4416dfdcff6e4bb025220b88d5fc132ae48e7cb437John "Juce" Bruce#endif // CLEARKEY_AES_CTR_DECRYPTOR_H_ 45