Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <ctype.h>
int sbs_entry ( char *UserName, char *NewPasswd, char *OldPasswd, char **Message
)
{
int Upper = 0, Lower = 0, Number = 0, Punct = 0;
int iReturn = 0;
for ( ; *NewPasswd; NewPasswd++ )
{
if ( isupper ( *NewPasswd ) )
Upper++;
else if ( islower ( *NewPasswd ) )
Lower++;
else if ( isdigit ( *NewPasswd ) )
Number++;
else if ( ispunct ( *NewPasswd ) )
Punct++;
}
if ( ! Upper )
{
if ( ( *Message = (char *)malloc (64) ) == NULL )
iReturn = -1;
else
{
sprintf ( *Message, "Password must contain at least one upper case character
\n" );
iReturn = 1;
}
}
else if ( ! Lower )
{
if ( ( *Message = (char *)malloc (64) ) == NULL )
iReturn = -1;
else
{
sprintf ( *Message, "Password must contain at least one lower case character
\n" );
iReturn = 1;
}
}
else if ( ! Number )
{
if ( ( *Message = (char *)malloc (64) ) == NULL )
iReturn = -1;
else
{
sprintf ( *Message, "Password must contain at least one numeric character\n"
);
iReturn = 1;
}
}
else if ( ! Punct )
{
if ( ( *Message = (char *)malloc (64) ) == NULL )
iReturn = -1;
else
{
sprintf ( *Message, "Password must contain at least one special character\n"
);
iReturn = 1;
}
}
return iReturn;
}