Recent

Author Topic: Access ms key cointainer  (Read 2118 times)

Hansvb

  • Sr. Member
  • ****
  • Posts: 399
Access ms key cointainer
« on: August 18, 2021, 08:29:03 am »
Hi,

Can you acces key containers with Pascal?
With key container i mean these: https://docs.microsoft.com/en-us/dotnet/standard/security/how-to-store-asymmetric-keys-in-a-key-container
OS Windows 10 - Lazarus 2.0.12

mig-31

  • Sr. Member
  • ****
  • Posts: 287
Re: Access ms key cointainer
« Reply #1 on: August 18, 2021, 12:59:38 pm »
As I know you can't call NET from FreePascal.
Lazarus 2.0.6 - CentOS 7.x, Mageia 7.1

korba812

  • Full Member
  • ***
  • Posts: 224
Re: Access ms key cointainer
« Reply #2 on: August 18, 2021, 02:33:36 pm »
Using .net from within Free Pascal is difficult. Instead, you can try using CryptoAPI:
https://docs.microsoft.com/en-us/windows/win32/seccrypto/example-c-program-creating-a-key-container-and-generating-keys

PascalDragon

  • Hero Member
  • *****
  • Posts: 3515
  • Compiler Developer
Re: Access ms key cointainer
« Reply #3 on: August 19, 2021, 01:53:20 pm »
Can you acces key containers with Pascal?
With key container i mean these: https://docs.microsoft.com/en-us/dotnet/standard/security/how-to-store-asymmetric-keys-in-a-key-container

You'll probably be able to use the Crypto API Next Generation (CNG) as .NET is probably using these under the hood as well.

paweld

  • Sr. Member
  • ****
  • Posts: 312
Re: Access ms key cointainer
« Reply #4 on: August 19, 2021, 03:11:21 pm »
Best regards
paweld

 

TinyPortal © 2005-2018