2023-12-01 17:32:19 +00:00
|
|
|
// Copyright 2014 Google LLC. All rights reserved.
|
2014-02-14 23:21:05 +00:00
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2014-01-07 18:32:23 +00:00
|
|
|
//
|
|
|
|
// RSA test data generated using fake_prng for purposes of testing.
|
|
|
|
|
2017-12-20 00:56:36 +00:00
|
|
|
#ifndef PACKAGER_MEDIA_BASE_RSA_TEST_DATA_H_
|
|
|
|
#define PACKAGER_MEDIA_BASE_RSA_TEST_DATA_H_
|
2014-01-07 18:32:23 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2023-12-01 17:32:19 +00:00
|
|
|
#include <packager/macros/classes.h>
|
2014-01-07 18:32:23 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2014-01-07 18:32:23 +00:00
|
|
|
namespace media {
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Self generated test vector to verify algorithm stability.
|
2014-01-07 18:32:23 +00:00
|
|
|
struct RsaTestSet {
|
2014-01-16 00:52:07 +00:00
|
|
|
RsaTestSet();
|
|
|
|
~RsaTestSet();
|
|
|
|
|
2014-01-07 18:32:23 +00:00
|
|
|
std::string public_key;
|
|
|
|
std::string private_key;
|
|
|
|
std::string test_message;
|
|
|
|
std::string encrypted_message;
|
|
|
|
std::string signature;
|
|
|
|
};
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Collection of test sets.
|
2014-01-07 18:32:23 +00:00
|
|
|
class RsaTestData {
|
|
|
|
public:
|
|
|
|
RsaTestData();
|
|
|
|
~RsaTestData();
|
|
|
|
|
|
|
|
const RsaTestSet& test_set_3072_bits() const { return test_set_3072_bits_; }
|
|
|
|
const RsaTestSet& test_set_2048_bits() const { return test_set_2048_bits_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
RsaTestSet test_set_3072_bits_;
|
|
|
|
RsaTestSet test_set_2048_bits_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(RsaTestData);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2014-01-07 18:32:23 +00:00
|
|
|
|
2017-12-20 00:56:36 +00:00
|
|
|
#endif // PACKAGER_MEDIA_BASE_RSA_TEST_DATA_H_
|