Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

vishalgpt

@vishalgpt
About
Posts
64
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • [CLOSED] Aes Encryption fails
    V vishalgpt

    Thank you

    Regards, Vishal

    ASP.NET algorithms security help question

  • [CLOSED] Aes Encryption fails
    V vishalgpt

    sir can you please guide which aes module for asp.net contains OFB cipher mode

    Regards, Vishal

    ASP.NET algorithms security help question

  • [CLOSED] Aes Encryption fails
    V vishalgpt

    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

    ASP.NET algorithms security help question

  • Stuck at FILE_ATTRIBUTE_REPARSE_POINT attribute
    V vishalgpt

    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

    C / C++ / MFC sysadmin data-structures help tutorial

  • AES Encryption Help
    V vishalgpt

    perhaps you had not understand my question, my question was related to modes and iv. Anyways thanks. :)

    Regards, Vishal

    C / C++ / MFC question security help tutorial

  • AES Encryption Help
    V vishalgpt

    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

    C / C++ / MFC question security help tutorial

  • how to unsigned int64 to two unsigned int32 values
    V vishalgpt

    very very thank you sir.

    Regards, Vishal

    C / C++ / MFC tutorial

  • how to unsigned int64 to two unsigned int32 values
    V vishalgpt

    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

    C / C++ / MFC tutorial

  • how to unsigned int64 to two unsigned int32 values
    V vishalgpt

    Thank you.. :)

    Regards, Vishal

    C / C++ / MFC tutorial

  • how to unsigned int64 to two unsigned int32 values
    V vishalgpt

    does it take endianness into consideration, (Little/Big Endian)

    Regards, Vishal

    C / C++ / MFC tutorial

  • how to unsigned int64 to two unsigned int32 values
    V vishalgpt

    How to convert _uint64 into two _uint32 values and vice versa.

    Regards, Vishal

    C / C++ / MFC tutorial

  • what is winRT?
    V vishalgpt

    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

    Windows Development question c++

  • What is winRT
    V vishalgpt

    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

    C / C++ / MFC c++ question

  • Help GWLP_USERDATA
    V vishalgpt

    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

    C / C++ / MFC c++ help tutorial

  • Subclass Procedure failed for edit control
    V vishalgpt

    thanx, I will check and update the result. Thanx once again for your guidance.

    Regards, Vishal

    C / C++ / MFC help question learning

  • Subclass Procedure failed for edit control
    V vishalgpt

    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

    C / C++ / MFC help question learning

  • Subclass Procedure failed for edit control
    V vishalgpt

    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

    C / C++ / MFC help question learning

  • How to Change the Blue Selection Color in Edit Control
    V vishalgpt

    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

    C / C++ / MFC tutorial c++

  • How to Change the Blue Selection Color in Edit Control
    V vishalgpt

    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

    C / C++ / MFC tutorial c++

  • How to Change the Blue Selection Color in Edit Control
    V vishalgpt

    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

    C / C++ / MFC tutorial c++
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups