This file contains 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.Threading.Tasks; | |
using Windows.ApplicationModel.Activation; | |
using Windows.ApplicationModel.Core; | |
using Windows.Storage; | |
using Windows.Storage.Pickers; | |
using Windows.Storage.Streams; | |
namespace Pinnacle.Pickers | |
{ |
This file contains 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
// WinRT Implementation of the base Behavior classes | |
public abstract class Behavior<T> : Behavior where T : DependencyObject | |
{ | |
protected T AssociatedObject | |
{ | |
get { return base.AssociatedObject as T; } | |
} | |
protected override void OnAttached() | |
{ |
This file contains 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
class AzureTrialService : ITrialService | |
{ | |
private readonly IMobileServiceClient _service; | |
public AzureTrialService(IMobileServiceClient service) | |
{ | |
_service = service; | |
TrialPeriod = TimeSpan.FromDays(7); | |
} |
This file contains 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 static string EncryptData(PublicKey key, string plainText) | |
{ | |
byte[] exponent = HexToBytes(key.Exponent); | |
byte[] modulus = HexToBytes(key.Modulus); | |
//**************** NEW ************************** | |
IAsymmetricKeyAlgorithmProvider provider = PCLCrypto.WinRTCrypto.AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithm.RsaSignPssSha512); | |
byte[] keyBlob == null; // how to convert my PublicKey class? | |
ICryptographicKey cryptographicKey = provider.ImportKeyPair(keyBlob) |