Welcome to the Xceed Community | Help
Community Search  
More Search Options

Password was not provided for encrypted data.

Sort Posts: Previous Next
  •  07-19-2012, 5:44 AM Post no. 32426

    Password was not provided for encrypted data.

    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?

     

  •  07-19-2012, 7:07 AM Post no. 32427 in reply to 32426

    Re: Password was not provided for encrypted data.

    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.

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.