public static void RegisterProvider(int type, HashAlgorithm hal) { if (type < 0) { return; } if (!IsExtended(type)) { Providers[type] = new CryptoHashCodeProvider(type, hal); } else { if (ExtendedProviders.ContainsKey(type)) { ExtendedProviders[type] = new CryptoHashCodeProvider(type, hal); } else { ExtendedProviders.Add(type, new CryptoHashCodeProvider(type, hal)); } } }
static CryptoService() { Providers = new CryptoHashCodeProvider[Enum.GetNames(typeof(CryptoHashType)).Length]; ExtendedProviders = new Dictionary<int, CryptoHashCodeProvider>(); }
public static void RegisterProvider(CryptoHashType type, HashAlgorithm hal) { Providers[(int)type] = new CryptoHashCodeProvider((int)type, hal); }
static CryptoService() { Providers = new CryptoHashCodeProvider[6]; ExtendedProviders = new Dictionary<int, CryptoHashCodeProvider>(); }
static CryptoService() { Providers = new CryptoHashCodeProvider[6]; ExtendedProviders = new Dictionary <int, CryptoHashCodeProvider>(); }
public static void RegisterProvider(int type, HashAlgorithm hal) { Providers[type] = new CryptoHashCodeProvider(type, hal); }
static CryptoService() { Providers = new CryptoHashCodeProvider[Enum.GetNames(typeof(CryptoHashType)).Length]; ExtendedProviders = new Dictionary <int, CryptoHashCodeProvider>(); }