This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Com.Razorpay; | |
using System.Net.Http; | |
using Newtonsoft.Json | |
using Xamarin.Forms; | |
[assembly: Dependency(typeof(PaymentInterface))] | |
namespace PlatformServices | |
{ | |
public class PaymentInterface :IPaymentInterface | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Diet.iOS.CustomRenderer; | |
using UIKit; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
using WebKit; | |
using Foundation; | |
using System.Net.Http; | |
using Newtonsoft.Json; | |
using System.Net.Http.Headers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CustomWebView.cs: | |
using System; | |
using Xamarin.Forms; | |
namespace CustomControls | |
{ | |
public class CustomWebView : WebView | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AndroidX.Activity.Result; | |
using AndroidX.Activity.Result.Contract; | |
[Activity(Label = "EditImageActivity", MainLauncher = false)] | |
public class MyActivity : Activity | |
{ | |
private ActivityResultCallback _activityResultCallback; | |
private ActivityResultLauncher _activityResultLauncher; | |
public static int _requestCode; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static byte[] iv; | |
public byte[] DoEncryptionString(string strText) | |
{ | |
var secretKey = GetKeyFromKeyStore(); | |
Cipher cipher = Cipher.GetInstance("AES/GCM/NoPadding"); | |
cipher.Init(Javax.Crypto.CipherMode.EncryptMode, secretKey); | |
iv = cipher.GetIV(); | |
var encryption = cipher.DoFinal(System.Text.Encoding.UTF8.GetBytes(strText)); | |
return encryption; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void DoDecryption(string src, string dest) | |
{ | |
//iv = Base64.Decode(ivString , Base64Flags.NoWrap); | |
if (iv != null && iv.Length > 0) | |
{ | |
var secretKey = GetKeyFromKeyStore(); | |
Cipher cipher = Cipher.GetInstance("AES/GCM/NoPadding"); | |
Javax.Crypto.Spec.GCMParameterSpec spec = new Javax.Crypto.Spec.GCMParameterSpec(128, iv); | |
cipher.Init(Javax.Crypto.CipherMode.DecryptMode, secretKey, spec); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static byte[] iv; | |
private void DoEncryption(string src, string dest) | |
{ | |
IKey secretKey = GetKeyFromKeyStore(); | |
Cipher cipher = Cipher.GetInstance("AES/GCM/NoPadding"); | |
cipher.Init(Javax.Crypto.CipherMode.EncryptMode, secretKey); | |
iv = cipher.GetIV(); | |
//var ivString = Base64.EncodeToString(iv, Base64Flags.NoWrap); //converted iv byte to string | |
var bytes = System.IO.File.ReadAllBytes(src); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace ServiceManager | |
{ | |
public interface IEmployeeService | |
{ | |
List<string> GetEmployeeNameList(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace ServiceManager | |
{ | |
public class EmployeeService : IEmployeeService | |
{ | |
public EmployeeService() | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CommonServiceLocator; | |
namespace SampleAutoFacDI.ViewModels | |
{ | |
public class ViewModelLocator | |
{ | |
static ViewModelLocator() | |
{ | |
AutoFacContainer.Initialize(); | |
} |
NewerOlder