public static string GetWalletExecuteableFilename()
        {
            var cfg      = Cfg.GetConfig <WalletConfig>();
            var platform = BoxsieUtils.GetPlatform();

            return($"{cfg.InstallerFilename}{(platform == OS.Windows ? ".exe" : "")}");
        }
Example #2
0
        public static void Configure(IServiceProvider serviceProvider)
        {
            Cfg.InitialiseConfig(serviceProvider);

            var logFactory = serviceProvider.GetService <ILoggerFactory>();

            logFactory.AddProvider(new BxLoggerProvider(Cfg.GetConfig <GeneralConfig>()));

            serviceProvider.GetService <RepositoryService>().EnsureDbCreated();

            App = serviceProvider.GetService <IBxApp>();
        }
Example #3
0
        private static string PadKey(string key)
        {
            var keyBase = Cfg.GetConfig <GeneralConfig>().EncryptKeyBase;

            const int bitLen = 32;

            if (key.Length < bitLen)
            {
                key = $"{key}{keyBase.Substring(0, bitLen - key.Length)}";
            }
            else if (key.Length > bitLen)
            {
                key = key.Substring(0, bitLen);
            }

            return(key);
        }