小编cod*_*ion的帖子

SHA 256 pseuedocode?

我一直在努力研究SHA-256的工作原理.我一直在为其他算法做的一件事是我已经为算法制定了一种逐步的伪代码函数.

我试过为SHA256做同样的事情,但到目前为止我遇到了很多麻烦.

我试图弄清楚维基百科图如何工作,但除了解释函数的文本部分,我不确定我是否正确.

这是我到目前为止所拥有的:

Input is an array 8 items long where each item is 32 bits.
Output is an array 8 items long where each item is 32 bits.
Calculate all the function boxes and store those values. 
|I'll refer to them by function name
Store input, right shifted by 32 bits, into output. 
| At this point, in the out array, E is the wrong value and A is empty
Store the function boxes.
| now we need …
Run Code Online (Sandbox Code Playgroud)

cryptography pseudocode sha sha256

17
推荐指数
2
解决办法
3万
查看次数

C++如何处理指针上的非虚函数调用?

我已经搜索过但找不到任何结果(我的术语可能已关闭)所以请原谅我,如果以前曾经问过这个问题.我可能使用了错误的搜索关键字.

我理解如何使用vtable来处理指针上的虚函数调用,特别是当"免费使用"漏洞发挥作用时.但是,假设你有一个指向myclass的指针,并且当myfunction未虚拟实现时你调用函数myfunction?根据一点读数,有一个较少的获取,IE而不是获取函数的地址,然后获取函数,然后调用,它是直接获取.

令我困惑的是,如果在使用之前释放了指向myclass的指针,它将如何工作.编辑:上一段不清楚,我试图弄清楚可能会出现什么样的未定义行为.

任何人都可以为我清除这个吗?如果我的问题不清楚,我会澄清......

CodeLion

编辑:

MyClass *myclass;
free(myclass);
myclass->DoSomething();

Declaration of DoSomething()
void DoSomething{...} // NOT virtual void DoSomething
Run Code Online (Sandbox Code Playgroud)

c++ pointers function

1
推荐指数
1
解决办法
189
查看次数

标签 统计

c++ ×1

cryptography ×1

function ×1

pointers ×1

pseudocode ×1

sha ×1

sha256 ×1