/// <summary> /// Creates an ECDSA instance with a freshly generated keypair. /// </summary> /// <returns>Returns the ECDSA instance which has the generated keypair.</returns> public static IEnumerable <EthereumEcdsa> Generate(int count, IAccountDerivation accountFactory) { if (UseNativeLib) { return(EthereumEcdsaNative.Generate(count, accountFactory)); } else { return(EthereumEcdsaBouncyCastle.Generate(count, accountFactory)); } }
/// <summary> /// Creates an ECDSA instance with a freshly generated keypair. /// </summary> /// <returns>Returns the ECDSA instance which has the generated keypair.</returns> public static EthereumEcdsa Generate(IAccountDerivation accountFactory) { if (UseNativeLib) { return(EthereumEcdsaNative.Generate(accountFactory)); } else { return(EthereumEcdsaBouncyCastle.Generate(accountFactory)); } }
/// <summary> /// Creates an ECDSA instance with a freshly generated keypair. /// </summary> /// <returns>Returns the ECDSA instance which has the generated keypair.</returns> public static EthereumEcdsa Generate(IAccountDerivation accountFactory = null) { // If the account factory is null, we use a random factory if (accountFactory == null) { accountFactory = new SystemRandomAccountDerivation(); } // Determine which library to use if (UseNativeLib) { return(EthereumEcdsaNative.Generate(accountFactory)); } else { return(EthereumEcdsaBouncyCastle.Generate(accountFactory)); } }