Click here to Skip to main content
15,901,283 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to retieve files from a folder and pass it in a functio called in a loop Pin
Faez Shingeri26-Feb-12 18:09
Faez Shingeri26-Feb-12 18:09 
AnswerRe: How to retieve files from a folder and pass it in a functio called in a loop Pin
Jochen Arndt26-Feb-12 21:09
professionalJochen Arndt26-Feb-12 21:09 
GeneralRe: How to retieve files from a folder and pass it in a functio called in a loop Pin
Faez Shingeri26-Feb-12 23:47
Faez Shingeri26-Feb-12 23:47 
AnswerRe: How to retieve files from a folder and pass it in a functio called in a loop Pin
enhzflep26-Feb-12 21:14
enhzflep26-Feb-12 21:14 
Questionhow to insert and verify digital signatures in pdf? Pin
chp84526-Feb-12 16:10
chp84526-Feb-12 16:10 
AnswerRe: how to insert and verify digital signatures in pdf? Pin
enhzflep26-Feb-12 18:06
enhzflep26-Feb-12 18:06 
GeneralRe: how to insert and verify digital signatures in pdf? Pin
chp84526-Feb-12 20:00
chp84526-Feb-12 20:00 
GeneralRe: how to insert and verify digital signatures in pdf? Pin
enhzflep26-Feb-12 20:13
enhzflep26-Feb-12 20:13 
I'll assume that was supposed to be a question.
I'll also assume that it was you that gifted me the 2-vote for my last answer...

No. No need for me.

I've written code from scratch to create pdf documents containing text, line drawings, images and attachments - any/all of which may be deflated or ascii85 encoded.

One you can understand the format enough, you soon realize that a user can fairly easily remove your digital signature and the implied security it carries.

Hint: find a water-marked pdf and work out how to remove the watermark from _all_ pages.



Clearly, there's several parts to the task -

1. Decide whether you wish to create a 'byte range digest' or an 'object digest'
2. Implement a function (in your own app) to create this digest
3. Implement this same function again in a plug-in signature handler


[EDIT: Digital Signature Removal code added]
Here, a 10 line perl script to strip the digital signatures from a PDF Poke tongue | ;-P
XML
#!/usr/bin/perl
# Usage: perl invalidate-signing-certs.pl <in.pdf> out.pdf
#
binmode(STDIN);
binmode(STDOUT);
$/ = "\0";
while(<>) {
s#(/Perms<</DocMDP.*?>>)#' ' x length $1#ge;
s#(/Ff 1)(?=.*?/Lock )#' ' x length $1#ge;
s#(?<=/Lock)(.*?)(/Ff 1)#"$1" . ' ' x length $2#ge;
s#(/Lock .*?)(?=/)#' ' x length $1#ge;
print $_;
}

Source: http://ronin-group.org/misc_pdfsignatures.html[^]
QuestionHow can I set a string to an item of the ListCtrl(CListCtrl) as muti-line Pin
Joneeky26-Feb-12 14:06
Joneeky26-Feb-12 14:06 
AnswerRe: How can I set a string to an item of the ListCtrl(CListCtrl) as muti-line Pin
Richard Andrew x6426-Feb-12 14:24
professionalRichard Andrew x6426-Feb-12 14:24 
QuestionRe: How can I set a string to an item of the ListCtrl(CListCtrl) as muti-line Pin
David Crow27-Feb-12 3:00
David Crow27-Feb-12 3:00 
AnswerRe: How can I set a string to an item of the ListCtrl(CListCtrl) as muti-line Pin
Joneeky6-Mar-12 14:49
Joneeky6-Mar-12 14:49 
QuestionHow to move a treeitem with its child? Pin
Le@rner25-Feb-12 1:05
Le@rner25-Feb-12 1:05 
AnswerRe: How to move a treeitem with its child? Pin
«_Superman_»25-Feb-12 15:35
professional«_Superman_»25-Feb-12 15:35 
QuestionHow to defense attack of the WSAAsyncSelect TCP Server ? Pin
wangningyu24-Feb-12 7:01
wangningyu24-Feb-12 7:01 
AnswerRe: How to defense attack of the WSAAsyncSelect TCP Server ? Pin
Randor 24-Feb-12 10:21
professional Randor 24-Feb-12 10:21 
QuestionPreTranslateMessage problem? :( Pin
bosfan24-Feb-12 2:47
bosfan24-Feb-12 2:47 
AnswerRe: PreTranslateMessage problem? :( Pin
Jochen Arndt24-Feb-12 3:14
professionalJochen Arndt24-Feb-12 3:14 
GeneralRe: PreTranslateMessage problem? :( Pin
bosfan24-Feb-12 3:25
bosfan24-Feb-12 3:25 
GeneralRe: PreTranslateMessage problem? :( Pin
David Crow24-Feb-12 4:05
David Crow24-Feb-12 4:05 
GeneralRe: PreTranslateMessage problem? :( Pin
bosfan24-Feb-12 4:33
bosfan24-Feb-12 4:33 
GeneralRe: PreTranslateMessage problem? :( Pin
Jochen Arndt24-Feb-12 5:10
professionalJochen Arndt24-Feb-12 5:10 
GeneralRe: PreTranslateMessage problem? :( Pin
bosfan24-Feb-12 5:25
bosfan24-Feb-12 5:25 
AnswerRe: PreTranslateMessage problem? :( Pin
Member 843817224-Feb-12 4:51
Member 843817224-Feb-12 4:51 
GeneralRe: PreTranslateMessage problem? :( Pin
bosfan24-Feb-12 5:20
bosfan24-Feb-12 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.