secapi-sys 0.2.0

FFI bindings to SecAPI
/*
 * Copyright 2020-2023 Comcast Cable Communications Management, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef SA_KEY_DERIVE_COMMON_H
#define SA_KEY_DERIVE_COMMON_H

#include "sa_key_common.h"

// clang-format off
class SaKeyDeriveTest : public ::testing::Test {};

typedef std::tuple<std::tuple<sa_key_type, size_t>, sa_digest_algorithm, size_t, size_t> SaKeyDeriveAnsiX963TestType;

class SaKeyDeriveAnsiX963Test : public ::testing::TestWithParam<SaKeyDeriveAnsiX963TestType>, public SaKeyBase {};

typedef std::tuple<std::tuple<sa_key_type, size_t>, sa_digest_algorithm, size_t, size_t> SaKeyDeriveConcatTestType;

class SaKeyDeriveConcatTest : public ::testing::TestWithParam<SaKeyDeriveConcatTestType>, public SaKeyBase {};

typedef std::tuple<std::tuple<sa_key_type, size_t>, sa_digest_algorithm, size_t, size_t, size_t>
    SaKeyDeriveHkdfTestType;

class SaKeyDeriveHkdfTest : public ::testing::TestWithParam<SaKeyDeriveHkdfTestType>, public SaKeyBase {};

typedef std::tuple<size_t, size_t, uint8_t> SaKeyDeriveCmacTestType;

class SaKeyDeriveCmacTest : public ::testing::TestWithParam<SaKeyDeriveCmacTestType>, public SaKeyBase {};

class SaKeyDeriveNetflixTest : public ::testing::Test, public SaKeyBase {};

class SaKeyDeriveRootKeyLadderTest : public ::testing::Test, public SaKeyBase {};

class SaKeyDeriveCommonRootKeyLadderTest : public ::testing::Test, public SaKeyBase {};

// clang-format on
#endif // SA_KEY_DERIVE_COMMON_H