Recent

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

Hansvb

  • Hero Member
  • *****
  • Posts: 602
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

mig-31

  • Sr. Member
  • ****
  • Posts: 305
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.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

korba812

  • Sr. Member
  • ****
  • Posts: 392
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: 5446
  • 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

  • Hero Member
  • *****
  • Posts: 970
Re: Access ms key cointainer
« Reply #4 on: August 19, 2021, 03:11:21 pm »
Best regards / Pozdrawiam
paweld

 

TinyPortal © 2005-2018