#pragma once #include "../pkNX.HashDecoderConsole/HashDecoder.h" using namespace System; namespace pkNXHashDecoder { private ref class FnvHashDecoderWrapper { public: std::unordered_map StartDecoding(int length, int startChar) { return nativeHandle_->StartDecoding(length, startChar); } property int AllowedCharCount { int get() { return FnvHashDecoder::AllowedCharsCount; } } private: FnvHashDecoder* nativeHandle_ = new FnvHashDecoder(); }; public ref class FnvHashDecoderLib { public: static System::Collections::Generic::Dictionary^ StartDecoding(int length, int startChar) { FnvHashDecoderWrapper decoder{}; auto map = decoder.StartDecoding(length, startChar); auto dict = gcnew System::Collections::Generic::Dictionary(); for (const auto& entry : map) dict->Add(entry.first, gcnew System::String(entry.second.c_str())); return dict; } static property int AllowedCharCount { int get() { return FnvHashDecoder::AllowedCharsCount; } } }; }