Encryption in sql server 2005

  • I am trying to encrypt more 30 chars of plaintext with TRIPLE_AES, but SQL

    gives me errors or autmatically truncates my ciphertext/plaintext to 30

    plaintext characters.

    This particular SQL Statement .

    UPDATE tblDB

    SET ConnectionString = EncryptByKey(Key_guid('EncyptKey'),('Example

    connection string 33333333333333333333'))

    WHERE Label = @varLabel

    The 30 character result I get is:

    select * from tblDB

    Result - '"Example connection string 33"

    Does anyone have some suggestions? Thanks,

    Prem

  • CONNECTIONSTRING DATATYPE IS VARBINARY(500)

    ANY HELP IS APPRECIATED ?

  • I found the solution

    select convert(varchar(400), decryptbykey(fieldname)) from tblname. Thanks,

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply