|
| How to save TstDSSKey public key to stream? | |
| Chee Yang Chau 4/26/2018 10:36:26 AM 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 4/26/2018 3:46:30 PM Registered user |
Have you added the required units for the key format? In this case it is StreamSec.DSI.NETFormat.
|