Character encoding

Discussion in 'Java' started by JavaEnquirer, Oct 5, 2006.

  1. JavaEnquirer

    JavaEnquirer Guest

    I'm reading textual data out of an SQL Server 2005 database. This works
    fine as you'd expect, however, when I attempt to decrypt encrypted data
    using the Java cryptography classes I get the following error:

    javax.crypto.IllegalBlockSizeException: Input length must be multiple
    of 8 when decrypting with padded cipher

    Any one got any ideas? One theory I have concerns the fact that SQL
    Server 2005 uses USC-2 encoding whereas the decrypter expects UTF-8.
    Could this be at the heart of the problem? If so, how would I go about
    converting a USC-2 String into a UTF-8 encoded String?
     
    JavaEnquirer, Oct 5, 2006
    #1
    1. Advertising

  2. "JavaEnquirer" <> burped up warm pablum in
    news::

    > I'm reading textual data out of an SQL Server 2005 database. This works
    > fine as you'd expect, however, when I attempt to decrypt encrypted data
    > using the Java cryptography classes I get the following error:
    >
    > javax.crypto.IllegalBlockSizeException: Input length must be multiple
    > of 8 when decrypting with padded cipher
    >
    > Any one got any ideas?


    Yes! What is your input length?

    --
    Sincerely,

    Tris Orendorff
    [Q: What kind of modem did Jimi Hendrix use?
    A: A purple Hayes.]
     
    Tris Orendorff, Oct 9, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harley

    foreign character encoding

    Harley, Jul 26, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,004
    Harley
    Jul 26, 2003
  2. Hardy Wang

    Encoding.Default and Encoding.UTF8

    Hardy Wang, Jun 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    18,879
    Jon Skeet [C# MVP]
    Jun 9, 2004
  3. Replies:
    1
    Views:
    23,381
    Real Gagnon
    Oct 8, 2004
  4. raavi
    Replies:
    2
    Views:
    914
    raavi
    Mar 2, 2006
  5. Replies:
    2
    Views:
    378
Loading...

Share This Page