2016-10-20 01:31:50 +00:00
|
|
|
//
|
|
|
|
// MemoryFuzzer.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 19/10/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MemoryFuzzer_hpp
|
|
|
|
#define MemoryFuzzer_hpp
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstddef>
|
2017-06-05 14:36:07 +00:00
|
|
|
#include <vector>
|
2016-10-20 01:31:50 +00:00
|
|
|
|
|
|
|
namespace Memory {
|
|
|
|
|
2017-07-22 21:39:51 +00:00
|
|
|
/// Stores @c size random bytes from @c buffer onwards.
|
2016-10-20 01:31:50 +00:00
|
|
|
void Fuzz(uint8_t *buffer, size_t size);
|
2017-07-22 21:39:51 +00:00
|
|
|
|
|
|
|
// Replaces all existing vector contents with random bytes.
|
2017-06-05 14:36:07 +00:00
|
|
|
void Fuzz(std::vector<uint8_t> &buffer);
|
2016-10-20 01:31:50 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MemoryFuzzer_hpp */
|