12-31-2007, 09:52 PM
i keep getting an error using this function on an encrypted string that 'encrypt' created.
am i using it incorrect?
Error (RT) in Encrypt2: failed: incorrect buffer length
encrypted text:
(removed)
Dialog Code: Encrypt2
am i using it incorrect?
Error (RT) in Encrypt2: failed: incorrect buffer length
encrypted text:
(removed)
Dialog Code: Encrypt2
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "5 8"
str e5 e8 shKey shMsg
if(!ShowDialog("Encrypt2" &Encrypt2 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Shhhhh"
;2 Button 0x54030000 0x4 118 86 48 14 "Close"
;3 Button 0x54032000 0x0 2 86 48 14 "Encrypt"
;4 Button 0x54032000 0x0 60 86 48 14 "Decrypt"
;5 Edit 0x540300A0 0x200 58 2 158 14 ""
;6 Static 0x54000000 0x0 2 2 48 12 "Key"
;7 Static 0x54000000 0x0 2 22 48 12 "Text"
;8 Edit 0x54031084 0x200 58 20 158 54 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020104 "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,,shKey.getwintext(id(5 "Shhhhh"))
,,shMsg.getwintext(id(8 "Shhhhh"))
,,shMsg.encrypt(1 shMsg shKey)
,,shMsg.setwintext(id(8 "Shhhhh"))
,,shMsg.setclip
,case 4
,,shKey.getwintext(id(5 "Shhhhh"))
,,shMsg.getwintext(id(8 "Shhhhh"))
,,shMsg.decrypt(1 shMsg shKey)
,,shMsg.setwintext(id(8 "Shhhhh"))
,case IDOK
,case IDCANCEL
ret 1