Example #1
0
 public static Boolean Is(TypeDef typeDef)
 {
     try
     {
         var cryptoStreamDef = new CryptoStreamDefV2(typeDef);
         // Check if the crypt method has a ldc.i4 instruction
         return(cryptoStreamDef.CryptMethod.Body.Instructions.FirstOrDefault(
                    instr => instr.IsLdcI4()) != null);
     }
     catch { return(false); }
 }
Example #2
0
		public static Boolean Is(TypeDef typeDef)
		{
			try
			{
				var cryptoStreamDef = new CryptoStreamDefV2(typeDef);
				// Check if the crypt method has a ldc.i4 instruction
				return cryptoStreamDef.CryptMethod.Body.Instructions.FirstOrDefault(
					instr => instr.IsLdcI4()) != null;
			}
			catch { return false; }
		}