コード例 #1
0
ファイル: Security.cs プロジェクト: fengqk/Art
 static Security()
 {
     Security instance = new Random();
     map.Add("RANDOM", instance);
     map.Add("0", instance);
     instance = new NullSecurity();
     map.Add("NULLSECURITY", instance);
     map.Add("1", instance);
     instance = new ARCFourSecurity();
     map.Add("ARCFOURSECURITY", instance);
     map.Add("2", instance);
     instance = new MD5Hash();
     map.Add("MD5HASH", instance);
     map.Add("3", instance);
     instance = new HMAC_MD5Hash();
     map.Add("HMAC_MD5HASH", instance);
     map.Add("4", instance);
     instance = new CompressARCFourSecurity();
     map.Add("COMPRESSARCFOURSECURITY", instance);
     map.Add("5", instance);
     instance = new DecompressARCFourSecurity();
     map.Add("DECOMPRESSARCFOURSECURITY", instance);
     map.Add("6", instance);
     instance = new DecompressSecurity();
     map.Add("DECOMPRESSSECURITY", instance);
     map.Add("7", instance);
 }
コード例 #2
0
ファイル: HMAC_MD5Hash.cs プロジェクト: fengqk/Art
 public override Octets Final(Octets digest)
 {
     md5hash.Final(digest);
     MD5Hash ctx = new MD5Hash();
     ctx.Update(k_opad);
     ctx.Update(digest);
     return ctx.Final(digest);
 }
コード例 #3
0
ファイル: MD5Hash.cs プロジェクト: fengqk/Art
 public override Object Clone()
 {
     MD5Hash m = new MD5Hash();
     m.context.replace(context);
     return m;
 }