Re: encrypt filenames program
- From: Mike Amling <nospam@xxxxxxxxxx>
- Date: Sat, 11 Mar 2006 17:19:47 GMT
rino100@xxxxxxxxx wrote:
can anyone tell me why this program doesn't work if you give filenames> ...
with a "space line space".. like
file - 2005.bzip
here it is:
cin >>infilename;
cout<<"\n";
ifstream input(infilename.c_str());
Just exactly what value does infilename have here?
Is it "file - 2005.zip"? or "file"? or what?
Note: Your issue is not cryptographic. You'd get better answers at a newsgroup for C++.
> iv="àc€Õ=Xòžy"; //default bloc
This sure looks like dubious coding.
> StreamTransformationFilter stfEncryptor(cbcEn, new StringSink(
> outfilename ) );
> ...
> rename(infilename.c_str(),outfilename.c_str());
Storing binary data in a string is bad practice enough, but how can you expect the operating system to rename a file to arbitrary binary data? E.g., what do you expect is to do if there's an embedded NUL character?
--Mike Amling
.
- References:
- encrypt filenames program
- From: rino100
- encrypt filenames program
- Prev by Date: Re: a problem about security proof of prp function
- Next by Date: Re: Encryption provably free of trapdoors
- Previous by thread: Re: encrypt filenames program
- Next by thread: Re: encrypt filenames program
- Index(es):