mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
36 lines
681 B
C++
36 lines
681 B
C++
|
#pragma once
|
||
|
|
||
|
#include <memory>
|
||
|
#include <vector>
|
||
|
|
||
|
namespace Poco
|
||
|
{
|
||
|
namespace Util
|
||
|
{
|
||
|
class AbstractConfiguration;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
class SensitiveDataMasker
|
||
|
{
|
||
|
private:
|
||
|
class MaskingRule;
|
||
|
std::vector<std::unique_ptr<MaskingRule>> all_masking_rules;
|
||
|
|
||
|
public:
|
||
|
SensitiveDataMasker(const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix);
|
||
|
~SensitiveDataMasker();
|
||
|
void addMaskingRule(const std::string & name, const std::string & regexp_string, const std::string & replacement_string);
|
||
|
int wipeSensitiveData(std::string & data) const;
|
||
|
|
||
|
#ifndef NDEBUG
|
||
|
void printStats();
|
||
|
#endif
|
||
|
|
||
|
unsigned long rulesCount() const;
|
||
|
};
|
||
|
|
||
|
};
|