了解这段代码中的幻数 [英] Understanding magic numbers in this piece of code
本文介绍了了解这段代码中的幻数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
int keySize = dwKeySize / 8;
byte[] bytes = Encoding.UTF32.GetBytes( inputString );
int maxLength = keySize - 42;
第一个问题
int keySize = dwKeySize / 8;
为什么/8?
第二个问题
int maxLength = keySize - 42;
为什么是42?
First question
int keySize = dwKeySize / 8;
Why / 8?
Second question
int maxLength = keySize - 42;
Why 42?
推荐答案
我不知道,但是我希望答案在解释此代码的来源和作用的地方.
I have no idea, but I expect that the answer lies somewhere in the explanation of where this code came from, and what it does.
blockquote>
OK. No solution so far. Could you please give us more hints? :rolleyes:
确定.到目前为止没有解决方案.您能给我们更多提示吗? :rolleyes:
idris.bintang写道:
Why 42?
为什么42?
这篇关于了解这段代码中的幻数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文