Tuesday, December 21, 2010

Wednesday, November 17, 2010

TOEFL Links

Hello Friends,
I found some of the important links. These links will helpful for TOEFL. Please check out, it may help u lot. If you found it is good tell others. Else shut your mouth.


http://gotoefl.blogspot.com/

http://www.stuff.co.uk/toefl.htm

http://www.thetoefl.com/

http://www.ets.org/Media/Tests/TOEFL/exe/toeflSample.exe






Saturday, September 25, 2010

GRE Important Link

Hello Friends,
I found some of the important links. These links will helpful for GRE. Please check out, it may help u lot. If you found it is good tell others. Else shut your mouth.


http://gredownloads.blogspot.com/

http://gredownloads.blogspot.com/2008/07/gre-barrons-audio-wordlist-by-profm.html

http://rs13.rapidshare.com/files/101496851/advanced_english_dictionary.rar

http://www.achieverspoint.com/winoverwords.htm

http://www.blogcatalog.com/blog/gre-picture-dictionary

http://www.usingenglish.com/

http://www.enchantedlearning.com/alphabet/matchwordsandpix/

http://www.manythings.org/lulu/

http://allaboutgre.blogspot.com/2006/01/sample-essays.html

http://gre-download.blogspot.com/

http://www.greguide.com

http://www.online-languages.info/_ud2/dictionary.php?l1=english&l2=marathi

http://www.statementofpurpose.com/essay_samples.html

http://www.accesseducationindia.com/gre-engineering-ms.html

http://greghost.blogspot.com/2006/09/free-gre-downloads_05.html

http://grebag.blogspot.com/

http://www.codecoax.com/grerc/

http://www.info-gre.blogspot.com/

http://gre.complore.com/

http://gre.learnhub.com/

Saturday, May 8, 2010

NIS HMAC Implementation

#include
#include
#include

#define SIZE 64

typedef unsigned char uchar ;
int main ( int argc, char * argv[] )
{
FILE * kfp ;
FILE * ifp ;
FILE * ofp ;
FILE * tfp ;
uchar c[2] ;
uchar ch;
uchar key[SIZE] = { 0x00 } ;
uchar ipad[SIZE] ;
uchar opad[SIZE] ;
uchar command[100] ;
int i;

if ( 4 != argc )
{
printf( "Incorrect Usage!\n" ) ;
printf( "Correct Usage is ./hmac " ) ;
}
for ( i = 0; i < SIZE; i++ )
{
ipad[i] = 0x36 ;
opad[i] = 0x5C ;
}


kfp = fopen( argv[1], "r+b" ) ;
ofp = fopen( argv[3], "w+b" ) ;
tfp = fopen( "temp", "w+b" ) ;

fread( key, sizeof( uchar ), SIZE, kfp ) ;
fclose ( kfp );

for ( i = 0; i < SIZE; i++ )
{
key[i] = key[i] ^ ipad[i] ;
}

fwrite( key, sizeof( uchar ), SIZE, tfp ) ;
fclose( tfp ) ;

sprintf( command, "cat %s >> temp", argv[2]) ;
system( command ) ;
system( "./md5 temp > temp1" ) ;

kfp = fopen( argv[1], "r+b" ) ;
fread( key, sizeof( uchar ), SIZE, kfp ) ;
fclose ( kfp );
for ( i = 0; i < SIZE; i++ )
{
key[i] = key[i] ^ opad[i] ;
fwrite( &key[i], sizeof( uchar ), 1, ofp ) ;
}

tfp = fopen( "temp1", "r+b" ) ;
for ( i = 0; i < 16; i++ )
{
fread( c, sizeof( uchar ), 2, tfp );
c[0] -= '0' ;
if ( c[0] > 9 )
{
c[0] = c[0] + '0' - 'a' + 10 ;
}

c[1] -= '0' ;
if ( c[1] > 9 )
{
c[1] = c[1] + '0' - 'a' + 10 ;
}
ch = ( c[0] << 4 ) | c[1] ;
fwrite( &ch, sizeof( uchar ), 1, ofp ) ;
}
fclose( ofp ) ;

sprintf( command, "./md5 %s > temp", argv[3] ) ;
system( command ) ;
system( "cat temp" ) ;
printf( "\n" ) ;

return 0;
}

//OUTPUT:

root@root:~$ ./a.out key.txt hmac.c output.txt
7d1ef72ee877ec646f700288e0693462


Kaeyfile contents:
MHCVGFDC&^$$#@%^MHCVGFDC&^$$#@%^MHCVGFDC&^$$#@%^MHCVGFDC&^$$#@%^

NIS SDES Implementation

#include
#include

typedef unsigned short int uint16 ;
typedef unsigned char uchar;

#define BIT( b, n ) ( ( b >> n ) & 0x01 )

uint16 p10( uint16 );
uint16 p8( uint16 );
uint16 p4( uint16 ) ;
uint16 ip( uint16 );
uint16 ip_inv( uint16 );
uint16 ep( uint16 );
uint16 swap( uint16 );
void print( uint16 );
void genkeys( uint16, uint16*, uint16* );
uint16 encrypt( uint16, uint16, uint16) ;



uint16 S0[4][4] =
{
{ 1, 0, 3, 2 },
{ 3, 2, 1, 0 },
{ 0, 2, 1, 3 },
{ 3, 1, 0, 3 }
};
uint16 S1[4][4] =
{
{ 0, 1, 2, 3 },
{ 2, 0, 1, 3 },
{ 3, 0, 1, 0 },
{ 2, 1, 0, 3 }
};


void dispCorrectUsage()
{
printf( "Incorrect Usage!\n" ) ;
printf( "Correct Usage is:

Program for sum of series

//Program to calculate the sum of series

#include
#include
long int factorial(int n);
void main()
{
int n,i;
float s,r;
char c;
clrscr();
repeat : printf("\nYou have this series:- 1/1! + 2/2! + 3/3! + 4/4! ...");
printf("\n\nTo which term you want its sum? ");
scanf("%d",&n);
s=0;
for (i=1;i<=n;i++)
{ s=s+((float)i/(float)factorial(i)); }
printf("\nThe sum of '[%d]' terms is : %f",n,s);
fflush(stdin);
printf ("\n\nDo you want to continue?(y/n):- ");
scanf("%c",&c);
if (c=='y')
goto repeat;
getch();
}

long int factorial(int n)
{
if (n<=1)
return(1);
else
n=n*factorial(n-1);
return(n);
}

Pyramid of nos

//Pyramid of Numbers

#include
#include

int pyramid( int length )
{
clrscr();
int line = 1;
int j = 1, i, k = length;

while( length-- )
{
if( j == 1 )
{
for( i = 1; i <= length + 5; i++ )
printf( "" );
printf( "%d", j++ );printf("\n");
k--;
line++;
}

else if( i % 2 )
{
for( i = 1; i <= length + 5; i++ )
printf( "" );
for( i = 1; i <= line; i++ )
printf( "%d ", ( j++ % 10 ) );
printf( "\n" );
line++;
k--;
}

else
{
for( i = 1; i <= length + 5 ; i++ )
printf( "" );
for( i = 1; i <= line; i++ )
printf( "%d ", ( j++ % 10 ) );
printf( "\n" );
line++;
k--;
}
}

return 0;
}

int main( )
{
clrscr();
int length;

printf( "Enter the list length" );
scanf( "%d", &length );

pyramid( length );
getch( );
return 0;
}