public static A CreateService <A>(ICryptoServiceType <A> type)
 {
     if (type is IAsymmetricKey)
     {
         return(ThreadSecurityContext.CreateService(type, (IAsymmetricKey)type));
     }
     return(ThreadSecurityContext.CreateService(type));
 }
 public static A CreateService <A>(ICryptoServiceType <A> type, SecureRandom random)
 {
     return(ThreadSecurityContext.CreateService(type, (IAsymmetricKey)type, random));
 }
Exemplo n.º 3
0
        internal A CreateService <A>(ICryptoServiceType <A> type, IAsymmetricKey key)
        {
            CryptoStatus.IsReady();

            return((type as IServiceProvider <A>).GetFunc(this).Invoke(key));
        }
Exemplo n.º 4
0
        internal A CreateService <A>(ICryptoServiceType <A> type, IAsymmetricKey key, SecureRandom random)
        {
            CryptoStatus.IsReady();

            return((type as IServiceProvider <A>).GetFunc(this).Invoke(new KeyWithRandom(key, random)));
        }
Exemplo n.º 5
0
        internal A CreateService <A>(ICryptoServiceType <A> type)
        {
            CryptoStatus.IsReady();

            return((type as IServiceProvider <A>).GetFunc(this).Invoke((IKey)type));
        }