|
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.
|