- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear friends
I wrote this simple code to test the ARCFour algorithm,but when I run my program the decrypted cipher-text is not the same as the original plain-text...could anyone tell me what is wrong with my code??
int ctxSize;
Ipp8u ctext[8];
Ipp8u pDst[8];
Ipp8u key[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
Ipp8u pSrc[] ={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
ippsARCFourGetSize(&ctxSize);
IppsARCFourState* pCtx = (IppsARCFourState*)( new Ipp8u [ctxSize] );
ippsARCFourInit(key,sizeof(key),pCtx);
ippsARCFourEncrypt(pSrc,ctext,sizeof(pSrc),pCtx);
ippsARCFourDecrypt(ctext, pDst, sizeof(ctext), pCtx);
when I debug this code pDst is not the same as PSrc!!!
Thanks in advance
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - achrzesz2
Hello achrzesz2
Thanx very much for your help, I have added ippsARCFourReset(pCtx) before decrption function and decrypted ctext become the same as the original ptext.
again many tanks to you dear.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page