Hi nematzadeh,
Wei shows us how to secret share a file in test.cpp
(http://cryptopp.com/docs/ref/test_8cpp-source.html). See
SecretShareFile (line 542). Also of interst might be
InformationDisperseFile.
Jeff
On 3/13/08, nematzadeh <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I am new to Crypto++. I compiled CryptoPP552 with Visual Studio 6 in a
> Windows XP SP 2 SO.
>
> I am trying to split a .pfx into n shares with secret sharing. As soon
> as I call ArraySource.PumpMessages, i get a Runtime Error: "abormal
> program termination".
>
> pMyPFX->pbData = (BYTE *) calloc(pMyPFX->cbData, sizeof(BYTE));
>
> if(PFXExportCertStoreEx(
> hCertStore,
> pMyPFX,
> NULL,
> NULL,
> EXPORT_PRIVATE_KEYS |
> REPORT_NO_PRIVATE_KEY |
> REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY))
> {
> const char* seed = "prueba";
> int nTresholds = 2;
> int nShares = 4;
>
> RandomPool rng;
> rng.IncorporateEntropy((byte *)seed, strlen(seed));
>
> SecretSharing *ss = new SecretSharing(rng, nTresholds,
> nShares);
>
> ArraySource source = new ArraySource(pMyPFX->pbData,
> pMyPFX->cbData,
> false, ss);
>
> source.PumpMessages();
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---