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
|
|
|
|
|
|
|
#include <gflags/gflags.h>
|
|
|
|
|
2017-06-14 23:18:16 +00:00
|
|
|
#include "packager/app/gflags_hex_bytes.h"
|
|
|
|
|
2017-10-17 23:03:08 +00:00
|
|
|
DECLARE_bool(enable_raw_key_encryption);
|
|
|
|
DECLARE_bool(enable_raw_key_decryption);
|
2017-06-14 23:18:16 +00:00
|
|
|
DECLARE_hex_bytes(key_id);
|
|
|
|
DECLARE_hex_bytes(key);
|
2017-09-20 22:49:00 +00:00
|
|
|
DECLARE_string(keys);
|
2017-06-14 23:18:16 +00:00
|
|
|
DECLARE_hex_bytes(iv);
|
|
|
|
DECLARE_hex_bytes(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_
|