Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Password was not provided for encrypted data.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20481 |

    Hello XCeed experts,

     

    I compress a string (called compressedDossier) like so (VB.NET):

    Dim compressedDossier As String = System.Text.Encoding.Unicode.GetString( _
                    Xceed.Compression.Formats.XceedCompressedStreamEx.Compress( _
                        System.Text.Encoding.Default.GetBytes(dossier))) 

    Not important for this issue, but I persist this string to the Database. Later I retrieve this string from the database and I want to decompress it like this (VB.NET):

                           Dim decompressedDossier As String = String.Empty

                            Try

                                ‘Het dossier is niet gezipped dus we kunnen het dossier simpelweg decomprimeren.
                                decompressedDossier = System.Text.Encoding.Unicode.GetString( _
                                    Xceed.Compression.Formats.XceedCompressedStreamEx.Decompress( _
                                        System.Text.Encoding.Default.GetBytes(dossier.Content)))
                            Catch ex As Exception
                                GeneralServices.WriteToLog(“PatientDossierRetriever.GetDossier: ” & ex.Message)
                            End Try 

     As you can see I write my error message away to  logfile, again not important for this problem. But the message of the exception (ex.message) is:

    ” Password was not provided for encrypted data.”

     As you can see in above example I do not provide a password. So why all of a sudden does it need one now? I’ve already tried to provide passwords at the compress as also the decompress (made a password like: “Hello”). But then it gives me the error that not the correct password was provided (which is strange because I absolutely used “Hello” as password).

     Can anyone help me with this strange problem?

     

    Imported from legacy forums. Posted by Danny (had 1127 views)

    User (Old forums)
    Member
    Post count: 23064

    Well, it turned out to be an encoding problem. We found our old testproject (we could’ve sworn it worked) and saw I made a mistake. Don’t know what this has to do with the password, but I’ll let XCeed work further on that.

     The immidiate problem is resolved  luckily, so I can move on.

    Imported from legacy forums. Posted by Danny (had 893 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.