[cisco-voip] UCCX Scripting and SQL 2005 ENCRYPTBYPASSPHRASE
Teixeira, Mike
mwteixeira at bendbroadband.net
Wed Aug 4 17:22:16 EDT 2010
Hello,
I am trying to use encryptbypassphrase an SQL 2005 SQL encryptiong with our UCCX 7.0 installation. The DB-Write is throwing an ArrayindexOutOfBounds Exception. I used to use a bitwise operation to store the data but this seems so much cleaner and secure.
When I view the db-fields using the DB-Write method the column in question(CCNumber) is showing up as a com.cisco.doc.Document. While the column is actually a varbinary(50). If I remove the encryptbypassphrase line from the SQL statement the data inserts without error. The variable that I am passing the encryptbypassphrase statement, is a string. I have tried a string, and a bigint. Do I need to create a document object variable for this to work? If so, how do I cast a string to the document variable? Can I even cast a string to a document variable?
Mike
Here is the SQL Statement.
INSERT INTO PayByPhone
(house, cust, CCNumber, CCExpMonth, CCExpYear, PaymentAmount, Processed, SubmittedOn)
VALUES ($LHouse, $iCust,
ENCRYPTBYPASSPHRASE('thisismypassphraseNotreallyIchangedit',$sCCnumber),
$LCCExpMonth, $LCCExpYear, $dblPaymentAmount, '0', GETDATE());
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20100804/48e5d031/attachment.html>
More information about the cisco-voip
mailing list