private static unsafe StoreLocation CreateFromNative(NativeTypes.FABRIC_X509_STORE_LOCATION nativeStoreLocation) { switch (nativeStoreLocation) { case NativeTypes.FABRIC_X509_STORE_LOCATION.FABRIC_X509_STORE_LOCATION_CURRENTUSER: return(StoreLocation.CurrentUser); case NativeTypes.FABRIC_X509_STORE_LOCATION.FABRIC_X509_STORE_LOCATION_LOCALMACHINE: return(StoreLocation.LocalMachine); default: throw new InvalidOperationException(StringResources.Error_InvalidX509StoreLocation); } }
internal static extern IFabricStringResult FabricDecryptText( [In] IntPtr encryptedValue, [In] NativeTypes.FABRIC_X509_STORE_LOCATION certStoreLocation);
internal static extern IFabricStringResult FabricEncryptText( [In] IntPtr text, [In] IntPtr certThumbPrint, [In] IntPtr certStoreName, [In] NativeTypes.FABRIC_X509_STORE_LOCATION certStoreLocation, [In] IntPtr algorithmOid);