.method public hidebysig instance string 
        KeyMd5(string str,
               int32 t1) cil managed
{
  // 代码大小       54 (0x36)
  .maxstack  3
  .locals init ([0] string md5str,
           [1] int32 i,
           [2] string CS$1$0000,
           [3] bool CS$4$0001)
  IL_0000:  nop
  IL_0001:  ldarg.1
  IL_0002:  stloc.0
  IL_0003:  ldc.i4.0
  IL_0004:  stloc.1
  IL_0005:  br.s       IL_0028
  IL_0007:  nop
  IL_0008:  ldloc.0
  IL_0009:  ldstr      "MD5"
  IL_000e:  call       string [System.Web]System.Web.Security.FormsAuthentication::HashPasswordForStoringInConfigFile(string,
                                                                                                                      string)
  IL_0013:  ldstr      "A"
  IL_0018:  ldstr      "F"
  IL_001d:  callvirt   instance string [mscorlib]System.String::Replace(string,
                                                                        string)
  IL_0022:  stloc.0
  IL_0023:  nop
  IL_0024:  ldloc.1
  IL_0025:  ldc.i4.1
  IL_0026:  add
  IL_0027:  stloc.1
  IL_0028:  ldloc.1
  IL_0029:  ldarg.2
  IL_002a:  clt
  IL_002c:  stloc.3
  IL_002d:  ldloc.3
  IL_002e:  brtrue.s   IL_0007
  IL_0030:  ldloc.0
  IL_0031:  stloc.2
  IL_0032:  br.s       IL_0034
  IL_0034:  ldloc.2
  IL_0035:  ret
} // end of method MyWebKey::KeyMd5
这段代码是什么意思。

解决方案 »

  1.   

    这是asp.net编译成的dll,用反编译工具查看的,我想知道这个方法是什么意思。
      

  2.   

    有MD5的算法,但是那个A,F是什么意思,不完全是MD5
      

  3.   

    猜测,有可能是把“A”换成“F”。
    String::Replace(string,
      string)
      

  4.   

    明文:http://198.168.18.134
    密文:39C438BB7CD47DD8444B482798E56DF2
    我试过把明文MD5后把A换成F,但是还是不对,大家继续研究。
      

  5.   

    你是用Ildasm.exe来查的么,这样的IL代码确实不容易看,换个反编译工具试试
      

  6.   

    .locals 声明局部变量
    ldarg.1 第一个参数入栈
    stloc.0 栈顶元素出栈,并赋值给索引为0的变量
    ldc.i4.0 一个4字节的整数,值为0,入栈
    stloc.1 栈顶元素出栈,并赋值给索引为1的变量
    ....
    ....
    楼主感兴趣自己上msdn学吧,看这个就是累点,但不难。
    .NET中間語言(IL)
      

  7.   

    反编译的代码。代码格式选择的IL,如果看不懂。代码就选择c#容易读一点。