コード例 #1
0
ファイル: CryptorFactory.cs プロジェクト: st609877063/juddi
        /// <summary>
        /// known implementations
        /// org.apache.juddi.v3.client.crypto.AES128Cryptor
        /// org.apache.juddi.v3.client.crypto.AES256Cryptor
        /// org.apache.juddi.v3.client.crypto.TripleDESCryptor
        /// </summary>
        /// <param name="clazz"></param>
        /// <returns></returns>
        public static Cryptor getCryptor(string clazz)
        {
            if (cache.ContainsKey(clazz))
            {
                return(cache[clazz]);
            }
            Cryptor c = null;

            if (clazz.Equals(typeof(org.apache.juddi.v3.client.cryptor.AES128Cryptor).Name))
            {
                c = new AES128Cryptor();
            }
            if (clazz.Equals(typeof(org.apache.juddi.v3.client.cryptor.AES256Cryptor).Name))
            {
                c = new AES256Cryptor();
            }
            if (clazz.Equals(typeof(org.apache.juddi.v3.client.cryptor.TripleDESCryptor).Name))
            {
                c = new TripleDESCryptor();
            }
            if (c != null)
            {
                cache.Add(clazz, c);
            }
            return(c);
        }
コード例 #2
0
ファイル: CryptorFactory.cs プロジェクト: lazycrazyowl/juddi
 /// <summary>
 /// known implementations
 /// org.apache.juddi.v3.client.crypto.AES128Cryptor
 /// org.apache.juddi.v3.client.crypto.AES256Cryptor
 /// org.apache.juddi.v3.client.crypto.TripleDESCryptor
 /// </summary>
 /// <param name="clazz"></param>
 /// <returns></returns>
 public static Cryptor getCryptor(string clazz)
 {
     if (cache.ContainsKey(clazz))
         return cache[clazz];
     Cryptor c = null;
     if (clazz.Equals(typeof(org.apache.juddi.v3.client.cryptor.AES128Cryptor).Name))
     {
         c = new AES128Cryptor();
     }
     if (clazz.Equals(typeof(org.apache.juddi.v3.client.cryptor.AES256Cryptor).Name))
     {
         c = new AES256Cryptor();
     }
     if (clazz.Equals(typeof(org.apache.juddi.v3.client.cryptor.TripleDESCryptor).Name))
     {
         c = new TripleDESCryptor();
     }
     if (c != null)
         cache.Add(clazz, c);
     return c;
 }