Beispiel #1
0
 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);
 }
Beispiel #2
0
 public override object Clone()
 {
     HMAC_MD5Hash o = new HMAC_MD5Hash();
     o.k_opad.replace(k_opad).reserve(64);
     o.md5hash = (MD5Hash)md5hash.Clone();
     return o;
 }
Beispiel #3
0
    Octets GenerateKey(Octets password, Octets nonce, Octets key)
	{
		HMAC_MD5Hash hash = new HMAC_MD5Hash();
		hash.SetParameter(password);
		hash.Update(nonce);
		return hash.Final(key);
	}