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)); }
internal A CreateService <A>(ICryptoServiceType <A> type, IAsymmetricKey key) { CryptoStatus.IsReady(); return((type as IServiceProvider <A>).GetFunc(this).Invoke(key)); }
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))); }
internal A CreateService <A>(ICryptoServiceType <A> type) { CryptoStatus.IsReady(); return((type as IServiceProvider <A>).GetFunc(this).Invoke((IKey)type)); }