Thank you
Regards, Vishal
Thank you
Regards, Vishal
sir can you please guide which aes module for asp.net contains OFB cipher mode
Regards, Vishal
why does this function fails, with CipherMode.OFB where as it works with CipherMode.ECB
Public Function EncryptAES(sIn As String, sKey As String) As String
Dim AES As New RijndaelManaged()
Dim ahashMD5 As New MD5CryptoServiceProvider()
AES.Key = ahashMD5.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(sKey))
AES.Mode = CipherMode.OFB
Dim AESEncrypt As ICryptoTransform = AES.CreateEncryptor()
Dim aBuffer As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(sIn)
Return Convert.ToBase64String(AESEncrypt.TransformFinalBlock(aBuffer, 0, aBuffer.Length))
End Function
Error Message : Specified cipher mode is not valid for this algorithm.
Regards, Vishal
Hi to all, I am writing a program which will copy a directory tree and delete the source, every thing works as planned, but given that a reparse point could point anywhere (even network drives), one need to be careful when deleting recursively, it could end up deleting way more than on a target system. How to deal with this situation when dealing with FILE_ATTRIBUTE_REPARSE_POINT, whether it is a recursive copy routine or delete routine.
Regards, Vishal
perhaps you had not understand my question, my question was related to modes and iv. Anyways thanks. :)
Regards, Vishal
Hi to all, I am trying to implement Brian Gladman's AES Encryption in my program. But as i am new to Encryption, please guide which mode is good to use.
AES_RETURN aes_ecb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
int len, const aes_encrypt_ctx cx[1]);
AES_RETURN aes_cbc_encrypt(const unsigned char *ibuf, unsigned char *obuf,
int len, unsigned char *iv, const aes_encrypt_ctx cx[1]);
AES_RETURN aes_mode_reset(aes_encrypt_ctx cx[1]);
AES_RETURN aes_cfb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
#define aes_ofb_encrypt aes_ofb_crypt
AES_RETURN aes_ofb_crypt(const unsigned char *ibuf, unsigned char *obuf,
and i am confused on *iv what is this? I had to encrypt files as well as strings. :zzz: :~
Regards, Vishal
very very thank you sir.
Regards, Vishal
I too came across the union while using GetFileSize function. does it produces same result in little endian and big endian systems. as i want this for encryption section, where i had to convert 64bit unsigned integer to two 32 bit unsigned integer and vice versa, So looking for results on little endian and big endian system result.
Regards, Vishal
Thank you.. :)
Regards, Vishal
does it take endianness into consideration, (Little/Big Endian)
Regards, Vishal
How to convert _uint64 into two _uint32 values and vice versa.
Regards, Vishal
I have read many articles but failed to understand that winRT is based on Win32 Platform or Managed Framework Platform or a alternate to MFC.
Regards, Vishal
I have read many articles but failed to understand that winRT is based on Win32 Platform or Managed Framework Platform or a alternate to MFC.
Regards, Vishal
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) content);
content = (Content *) GetWindowLongPtr(hWnd, GWLP_USERDATA);
the above code works in window created using CreateWindow, but the same code fails when used with DialogBox. Is there any alternative to this. I want to store Pointer to a structure. using Win32 C++. please guide.
Regards, Vishal
thanx, I will check and update the result. Thanx once again for your guidance.
Regards, Vishal
got it, but one small doubt, if i want to set font for a control i usually do it in WM_INITDIALOG
or WM_CREATE
section, but in this case which Message has to be used for setting font, As i had found this can be done in WM_PAINT
section also, but WM_PAINT
is triggered every now and then, resulting in extra overload. Please guide which message will be better to set a font for a control in its subclassed procedure. Thanks.. :)
Regards, Vishal
Hi to all, I am subclassing an EDIT Control. But the WM_CREATE is not fired in Subclassed Procedure EditProc. What is wrong, i am unable to find. I had tried WM_NCCREATE also, but failed. pls help.. :( :confused:
#include
#include "resource.h"
WNDPROC OldEditProc;
HINSTANCE hInst;
HFONT hFont;
WNDPROC SUBCLASS(HWND hControl,WNDPROC newWindowProc)
{
return (WNDPROC)SetWindowLong(hControl,GWL_WNDPROC,(LONG)newWindowProc);
}
LRESULT CALLBACK EditProc(HWND hWnd,UINT Msg, WPARAM wParam, LPARAM lParam)
{
switch(Msg)
{
case WM_CREATE:
SetWindowText(hWnd,L"Welcome");
break;
}
return OldEditProc(hWnd,Msg,wParam,lParam);
}
LRESULT CALLBACK stdEditProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
switch(Msg)
{
case WM\_INITDIALOG:
OldEditProc = SUBCLASS(GetDlgItem(hWnd,IDC\_EDIT1),EditProc);
break;
case WM\_CLOSE:
EndDialog(hWnd,TRUE);
break;
}
return FALSE;
}
INT APIENTRY wWinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPWSTR lpCmdLine, __in int nShowCmd )
{
hInst = hInstance;
return DialogBox(hInst,MAKEINTRESOURCE(IDD_DIALOG1),NULL,(DLGPROC)stdEditProc);
}
Regards, Vishal
Hi, I was guessing the same, but i am creating a win32 application, 1) Sould i go with MFC 2) Or Subclass existing edit control in win32 c++ Or some other way if exists:...
Regards, Vishal
SetSysColors() works, but it had changed the default COLOR_HIGHLIGHT color to BLACK, I had used RGB(0,0,0) This function changes the global highlight color, I want to change highlight color of my edit control only. How to achieve this.
Regards, Vishal
Hi Everybody, I want to change the color of selecting text in an edit control and I ran out of ideas. I am totally confused, please anyone guide. It is a WIN32 C++ Application.
Regards, Vishal