public IDataProtector GetDataProtector() { if (RuntimeEnvironmentHelper.IsWindows()) { return(new DpapiDataProtector()); } throw new PlatformNotSupportedException(); }
public IVault GetVault() { if (RuntimeEnvironmentHelper.IsWindows()) { return(new CredentialStoreVault()); } if (RuntimeEnvironmentHelper.IsOSX()) { return(new KeyChainVault()); } throw new PlatformNotSupportedException(); }