New_Seed_Source.cpp
int SHA1Input(SHA1Context *context, const uint8_t *message_array, unsigned length) {
	if (!length) {			//condition for length
		return shaOk;
	}
	if (!context || !message_array) { //condition for no message array
		return shaNull;
	}
	if (context->Computed) {
		context->Corrupted = shaError; // condition to check corrupted bits
		return shaError;
	}
	if (context->Corrupted) {
		return context->Corrupted; // condition to check corrupted bits
	}
	while (length-- && !context->Corrupted)
	{
		context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF);
		context->Length_Low += 8;
		if (context->Length_Low == 0) {
			context->Length_High++;
			if (context->Length_High == 0) {
				/* Message is too long*/
				context->Corrupted = 1;
			}
		}
		if (context->Message_Block_Index == 64) {
			SHA1ProcessMessageBlock(context);
		}
		message_array++;
	}
	return shaOk;
}
/*
* SHA1 Input
* Description: This function accepts an array of octects as the next portion of the
* message

* message_array is a parameter : An array of Characters representing the next
* portion of the message

* length: length of the message in message_array

* Returns SHA Error code
* If the number of bits in a message is a multiple of 8, for compactness we can represent the message in hex.
* The padded message will contain 16 * n words for some n > 0. The padded message is regarded as a sequence of n blocks M(1) , M(2), first characters (or bits) of the message.
*/
SHA1 Input
Description: This function accepts an array of octects as the next portion of the
message

message_array is a parameter : An array of Characters representing the next
portion of the message

length of the message in message_array

Returns SHA Error code
If the number of bits in a message is a multiple of 8, for compactness we can represent the message in hex.
The padded message will contain 16 * n words for some n > 0. The padded message is regarded as a sequence of n blocks M(1) , M(2), first characters (or bits) of the message.
SHA1 Input Description : This function accepts an array of octects as the next portion of the message message_array is a parameter : An array of Characters representing the next portion of the message length of the message in message_array Returns SHA Error code If the number of bits in a message is a multiple of 8 for compactness we can represent the message in hex . The padded message will contain 16 * n words for some n > 0 . The padded message is regarded as a sequence of n blocks M ( 1 ) M ( 2 ) first characters ( or bits ) of the message .
int SHA1Input(SHA1Context *context, const uint8_t *message_array, unsigned length) {
	if (!length) {			
		return shaOk;
	}
	if (!context || !message_array) { 
		return shaNull;
	}
	if (context->Computed) {
		context->Corrupted = shaError; 
		return shaError;
	}
	if (context->Corrupted) {
		return context->Corrupted; 
	}
	while (length-- && !context->Corrupted)
	{
		context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF);
		context->Length_Low += 8;
		if (context->Length_Low == 0) {
			context->Length_High++;
			if (context->Length_High == 0) {
				context->Corrupted = 1;
			}
		}
		if (context->Message_Block_Index == 64) {
			SHA1ProcessMessageBlock(context);
		}
		message_array++;
	}
	return shaOk;
}
int SHA1Input ( SHA1Context * context , const uint8_t * message_array , unsigned length ) { if ( ! length ) { return shaOk ; } if ( ! context || ! message_array ) { return shaNull ; } if ( context -> Computed ) { context -> Corrupted = shaError ; return shaError ; } if ( context -> Corrupted ) { return context -> Corrupted ; } while ( length -- && ! context -> Corrupted ) { context -> Message_Block [ context -> Message_Block_Index ++ ] = ( * message_array & 0xFF ) ; context -> Length_Low += 8 ; if ( context -> Length_Low == 0 ) { context -> Length_High ++ ; if ( context -> Length_High == 0 ) { context -> Corrupted = 1 ; } } if ( context -> Message_Block_Index == 64 ) { SHA1ProcessMessageBlock ( context ) ; } message_array ++ ; } return shaOk ; }
SHA1 Input
Description: This function accepts an array of octects as the next portion of the
message
SHA1 Input Description : This function accepts an array of octects as the next portion of the message
//condition for length
 //condition for no message array
 // condition to check corrupted bits
 // condition to check corrupted bits
 /* Message is too long*/