Decryption in PCL project in xamarin application - xamarin

I am developing an application using xamarin.android, xamarin.ios and windows phone 8.1 silver light. I am using an encrypted data and want to decrypt data in PCL project. For encryption AesCryptoServiceProvider class has been used. I want to decrypt my data in PCL project but not found any library for doing this. The above mentioned class is worked well in Android and ios project but I am not be able to use in windows phone project. Any help regarding this is much appreciated.
Thanks in advance

Dependency injection/IoC is your friend. Basically you would implement an interface in PCL and implement it at OS level with whatever type is there that does the job.

Have a look at PCL Crypto. It probably supports the functionality you need.

Related

How to use System.Drawing. Common package in Xamarin

I am using System.Drawing.Common (https://www.nuget.org/packages/System.Drawing.Common/) package in .NET Core application to create bitmap image using GDI+. When I use the same package in Xamarin application which throws PlatformNotSupported exception.
Is anyone know when Xamarin support will be provided for this package?
I don't think it will ever be supported. GDI+ is very specific to the Windows platform. If you need any drawing library, you could have a look at SkiaSharp, which is supported by Xamarin.
You can replace System.Drawing.Common with Aspose.Drawing that has the same API and truly cross-platform. (I'm one of the developers.)

Xamarin Forms Cross Platform Persistent Storage

I'm looking for a way to persist settings (KVPs) in a Xamarin Forms app.
I'd like the settings to be easily bound and notified, very much like the SimpleSettings NuGet. The only problem with SimpleSettings is that it doesn't support UWP. Any ideas on a package that supports all.
Thanks
Take a look at SettingsPlugin by James Montemagno. It's supported on all platform and uses the native setttings API's (NSUserDefaults, SharedPreferences, etc) in the background.
Here's the documentation on how to get started: https://jamesmontemagno.github.io/SettingsPlugin/

Porting an Android application to Xamarin?

I am seeking insight. I have a android application, and would like to create a ios port. Would it be easier to recreate the application in Xamarin, or would it be like starting over again? how alike are android, and Xamarin? thanks for any insight or advice. I am wondering if it might be easier to do this or to just do it sperately on ios
First you need to disassemble your Android app to see which parts are portable. That also gives you hints on how to move on for each parts.
Android UI
UI can be reused easily, as Xamarin.Android projects use the same XML format. So that you can create Xamarin.Android projects and then replace their UI with your existing Android UI.
Third Party
Third party SDK/components can be imported to Xamarin, https://developer.xamarin.com/guides/android/advanced_topics/xamarin-for-java/
Or some vendors already have their Xamarin libraries/components.
General Java Code
For general Java code you want to port, you can try Sharpen,
https://github.com/mono/sharpen
Good luck.

Xamarin Forms with Touch ID Fingerprint Authentication

I am developing a multi-platform app with Xamarin Forms. I need to support Touch ID/fingerprint authentication for both the iOS and Android platforms. How can I do this? I am new to Xamarin.
I've developed a Plugin for this. It's available on NuGet, too. Feel free, to drop an issue, if you miss something, or found an error.
https://github.com/smstuebe/xamarin-fingerprint
In general: There are alot of Plugins that abstract platform specific behavior. Before you write something on your own, just google for "<feature> xamarin plugin". It will safe much time.
You will need to use a Dependency Service for platform-specific behavior. Look to the linked guide as a starting point.

MonoGame - References to Microsoft.Phone assemblies

How to cope with the Microsoft Phone specific assemblies when loading the classes inside a MonoGame For Android project (MonoGame FrameWork)? As e.g:
using Microsoft.Phone.BackgroundAudio;
using Microsoft.Phone.Marketplace;
using Microsoft.Phone.Tasks;
using System.Device.Location;
These will have to #if defed out as they are not currently supported under MonoGame.
Background audio should be supported via the Song and Sound classes though.
I think the MarketPlace namespace is an interesting one, and is one that should not be phone specific, as MacOS also has an App Store.
I hope this helps.

Resources