Home 
username password  
Welcome, Guest.
Your IP: 18.97.14.83
2025-01-26 11:49:25 
 Public Support
 How to save TstDSSKey public key to stream?
Bottom
 
Total posts: 2
 Author How to save TstDSSKey public key to stream?
Chee Yang Chau

2018-04-26 10:36:26
Registered user
I can use TstDSSKey to generate a key pair.  I can use the component to save private key to 'PKCS8-Encrypted-DSS' format.  However, I can't use it to save the match public key to stream:

var M: TStream;
    s: TstDSSKey;
    lPrivateKey: iDLPrivateKey;
begin
  lPrivateKey := ...;

  M := TMemoryStream.Create;
  s := TstDSSKey.Create(nil);
  s.SetPrivateKey(lPrivateKey);
  s.PublicKeyFormat.SelectedOptionNames := 'DSS-XmlString-Public';     
  s.SavePublicKeyToStream(M, IUnknown);  // Prompt interface not supported
end;

I try format "PUBLICKEYBLOB-DSS" too, and it has same problem.
Henrick Wibell Hellström

2018-04-26 15:46:30
Registered user
Have you added the required units for the key format? In this case it is StreamSec.DSI.NETFormat.
Top

:: Written with and Powered by the RealThinClient SDK and StreamSec Tools 4.0::
Copyright (c) Danijel Tkalcec, StreamSec HB