Exemple #1
0
        public IDataProtector GetDataProtector()
        {
            if (RuntimeEnvironmentHelper.IsWindows())
            {
                return(new DpapiDataProtector());
            }

            throw new PlatformNotSupportedException();
        }
Exemple #2
0
        public IVault GetVault()
        {
            if (RuntimeEnvironmentHelper.IsWindows())
            {
                return(new CredentialStoreVault());
            }
            if (RuntimeEnvironmentHelper.IsOSX())
            {
                return(new KeyChainVault());
            }

            throw new PlatformNotSupportedException();
        }