- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在搜索有关 C++ 模板元编程的链接时发现了这篇论文。我对 C++ 中的安全性和模板都不熟悉,希望有人能给我指出正确的方向。我无缘无故地要求它激起我的兴趣,而且我想了解更多信息。
这是论文:https://www.cisuc.uc.pt/publication/showfile?fn=1357250736_metaobfv3.pdf
或者只搜索名称:Binary code obfuscation through C++ template metaprogramming
我似乎无法弄清楚程序员会如何使用它。他们是通过模板创建类型然后在原始代码本身中使用这些类型吗?这是使用的一些代码:
struct uint32 {
unsigned int x_;
uint32(unsigned int x) : x_(x) {}
uint32(const uint32 &oth) : x_(oth.x_) {}
uint32 &operator=(const uint32 &oth) { x_ = oth.x_; return *this; }
operator unsigned int() const { return x_; }
};
static inline uint32 operator+(const uint32 &a, const uint32 &b) {
return uint32(ObfuscatedAdder<unsigned int>::eval(a.x_, b.x_));
}
这是第 6 页的一小部分。我正在尝试弄清楚使用他们的技术的程序员将如何着手创建……让我们说一个算法……然后混淆它。
这将是我假设的附加混淆。我将如何接受这样的声明:
unsigned int foo = 5 + 7;
在代码中并使用模板将其混淆成更复杂的身份?
最佳答案
unsigned int foo = 5 + 7;
不会被混淆,因为它属于 constant folding
。并将在编译时简单地替换为 unsigned int foo = 12;
。
该技术对于像这样的表达式特别有用。
uint32 a = 5;
uint32 b = 7;
unsigned int foo = a + b;
关于c++ - 想看懂这篇使用模板的论文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23101823/
我在这里的意图是创建一个单线程的 will-make-you-a-better-programmer-just-for-reading 之类的 文章 或 论文 或 真正站起来的博文作者付出了很多努力来
我想知道是否有人有很好的资源可以阅读或编写代码来试验“自动完成” 我想知道自动完成背后的理论是什么,从哪里开始什么是常见的错误等。 我发现 Enso、Launchy、Google chrome 甚至
市场上有许多工具,如 MPS,它们促进了面向语言的编程,据说这使程序员能够为任务设计(理想的?)语言。出于某种原因,这听起来既有趣又无聊,所以我想知道是否有人知道并可以推荐有关该主题的文章。 谢谢 最
我正在编写一个使用 JointJS 来显示图表的应用。 但是,我希望能够在页面中动态添加和删除图表。添加新图表相当简单,但是当我删除图表时,删除 DOM 元素并让图表和纸张对象被垃圾收集是否安全? 最
我在声明非成员函数listOverview()时出错; void listOverview() { std::cout #include class Book; class Paper
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 3 年前。 Improve this qu
我正在将 Raphael 与 Meteor 一起使用,但遇到了问题。我正在创建一个 paper通过使用 var paper = Raphael("paper", 800, 600);如果我将此代码放在
我正在使用acm LaTeX template我在使纸张双倍行距时遇到困难。 我的 LaTeX 文档如下所示: \documentclass{acm_proc_article-sp} \usepack
H.Chi Wong、Marshall Bern 和 David Goldberg 的论文“An Image Signature for any kind image”中提到的算法步骤背后的原因是什么
我一直在使用Microsoft Academic Knoledge API一周了,直到现在我还没有遇到任何问题。我想获取某个 session 的所有论文,例如 ICLR 或 ICML。我正在尝试使用从
我正在读这篇论文Understanding Deep learning requires rethinking generalization我不明白为什么在第 5 页第 2.2 节“含义、Redema
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
我必须为非程序员(我们公司的客户)创建一个 DSL,它需要提供一些更高级别的语言功能(循环、条件表达式、变量...... - 所以它不仅仅是一个“简单”的 DSL)。 使用 DSL 应该很容易;人们应
在卷积神经网络中梯度数据的可视化中,使用 Caffe 框架,已经可视化了所有类的梯度数据,对特定类采用梯度很有趣。在“bvlc_reference_caffenet”模型的 deploy.protot
auto(x)表达式被添加到语言中。一个理性的原因是我们无法以此完善前向衰减。 template constexpr decay_t decay_copy(T&& v) noexcept( i
我是一名优秀的程序员,十分优秀!