2022-08-26 15:44:59 +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-15 22:44:11 +00:00
|
|
|
//
|
2017-10-17 23:03:08 +00:00
|
|
|
// Defines command line flags for raw key encryption.
|
2014-01-15 22:44:11 +00:00
|
|
|
|
2017-10-17 23:03:08 +00:00
|
|
|
#ifndef PACKAGER_APP_RAW_KEY_ENCRYPTION_FLAGS_H_
|
|
|
|
#define PACKAGER_APP_RAW_KEY_ENCRYPTION_FLAGS_H_
|
2014-01-15 22:44:11 +00:00
|
|
|
|
2023-09-09 00:44:17 +00:00
|
|
|
#include <absl/flags/declare.h>
|
|
|
|
#include <absl/flags/flag.h>
|
|
|
|
|
|
|
|
#include "packager/utils/absl_flag_hexbytes.h"
|
|
|
|
|
|
|
|
ABSL_DECLARE_FLAG(bool, enable_raw_key_encryption);
|
|
|
|
ABSL_DECLARE_FLAG(bool, enable_raw_key_decryption);
|
|
|
|
ABSL_DECLARE_FLAG(shaka::HexBytes, key_id);
|
|
|
|
ABSL_DECLARE_FLAG(shaka::HexBytes, key);
|
|
|
|
ABSL_DECLARE_FLAG(std::string, keys);
|
|
|
|
ABSL_DECLARE_FLAG(shaka::HexBytes, iv);
|
|
|
|
ABSL_DECLARE_FLAG(shaka::HexBytes, pssh);
|
2014-01-15 22:44:11 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2014-10-13 22:06:48 +00:00
|
|
|
|
2017-10-17 23:03:08 +00:00
|
|
|
/// Validate raw encryption/decryption flags.
|
2014-10-13 22:06:48 +00:00
|
|
|
/// @return true on success, false otherwise.
|
2017-10-17 23:03:08 +00:00
|
|
|
bool ValidateRawKeyCryptoFlags();
|
2014-10-13 22:06:48 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2014-10-13 22:06:48 +00:00
|
|
|
|
2017-10-17 23:03:08 +00:00
|
|
|
#endif // PACKAGER_APP_RAW_KEY_ENCRYPTION_FLAGS_H_
|