Esempio n. 1
0
 internal static byte[] ExportCspBlobHelper(bool includePrivateParameters, CspParameters parameters, SafeKeyHandle safeKeyHandle)
 {
     if (includePrivateParameters && !CompatibilitySwitches.IsAppEarlierThanWindowsPhone8)
     {
         KeyContainerPermission            containerPermission = new KeyContainerPermission(KeyContainerPermissionFlags.NoFlags);
         KeyContainerPermissionAccessEntry accessEntry         = new KeyContainerPermissionAccessEntry(parameters, KeyContainerPermissionFlags.Export);
         containerPermission.AccessEntries.Add(accessEntry);
         containerPermission.Demand();
     }
     byte[] o = (byte[])null;
     Utils.ExportCspBlob(safeKeyHandle, includePrivateParameters ? 7 : 6, JitHelpers.GetObjectHandleOnStack <byte[]>(ref o));
     return(o);
 }