Source release 19.3.0
This commit is contained in:
@@ -7,18 +7,22 @@
|
||||
#ifndef WVOEC_UTIL_KEY_DERIVER_H_
|
||||
#define WVOEC_UTIL_KEY_DERIVER_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "cmac.h"
|
||||
#include "wv_class_utils.h"
|
||||
|
||||
namespace wvoec {
|
||||
namespace util {
|
||||
class KeyDeriver {
|
||||
public:
|
||||
~KeyDeriver() = default;
|
||||
WVCDM_DISALLOW_COPY_AND_MOVE(KeyDeriver);
|
||||
|
||||
// Create a new key deriver using either the session key or the device
|
||||
// key.
|
||||
// Returns an empty pointer if the key size is not valid.
|
||||
@@ -52,15 +56,13 @@ class KeyDeriver {
|
||||
bool DeriveRenewedDeviceKey(const std::vector<uint8_t>& context,
|
||||
std::vector<uint8_t>* renewed_device_key);
|
||||
|
||||
~KeyDeriver() {}
|
||||
|
||||
private:
|
||||
KeyDeriver() {}
|
||||
|
||||
bool Init(const uint8_t* key, size_t key_size);
|
||||
|
||||
std::unique_ptr<Cmac> cmac_;
|
||||
};
|
||||
}; // class KeyDeriver
|
||||
} // namespace util
|
||||
} // namespace wvoec
|
||||
#endif // WVOEC_UTIL_KEY_DERIVER_H_
|
||||
|
||||
Reference in New Issue
Block a user