






import argparse
import hashlib  # hashlib is only used inside the Test class
import struct



class 							SCREAMING_SNAKE_CASE__						:





					"""simple docstring"""






					def __init__( self					:  List[Any]							,		__A					:  List[Any]	):
						snake_case__			:				Tuple       =  data
						snake_case__			:				int       =  [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]



					@staticmethod
					def 	_lowercase					( __A					:  Optional[Any]							,		__A					:  str	):
						return ((n << b) | (n >> (3_2 - b))) & 0xFFFFFFFF



					def 	_lowercase					( self					:  str	):
						snake_case__			:				Any       =  b"\x80" + b"\x00" * (6_3 - (len(self.data	) + 8) % 6_4)
						snake_case__			:				int       =  self.data + padding + struct.pack(">Q"							,		8 * len(self.data	)	)
						return padded_data



					def 	_lowercase					( self					:  Tuple	):
						return [
						    self.padded_data[i : i + 6_4] for i in range(0							,		len(self.padded_data	)							,		6_4	)
						]



					def 	_lowercase					( self					:  Tuple							,		__A					:  Optional[int]	):
						snake_case__			:				Optional[int]       =  list(struct.unpack(">16L"							,		_SCREAMING_SNAKE_CASE	)	) + [0] * 6_4
						for i in range(1_6							,		8_0	):
							snake_case__			:				Optional[Any]       =  self.rotate((w[i - 3] ^ w[i - 8] ^ w[i - 1_4] ^ w[i - 1_6])							,		1	)
						return w






					def 	_lowercase					( self					:  Tuple	):
						snake_case__			:				Optional[Any]       =  self.padding()
						snake_case__			:				str       =  self.split_blocks()
						for block in self.blocks:
							snake_case__			:				int       =  self.expand_block(_SCREAMING_SNAKE_CASE	)
							snake_case__			:				Union[str, Any]       =  self.h
							for i in range(0							,		8_0	):
								if 0 <= i < 2_0:
									snake_case__			:				Dict       =  (b & c) | ((~b) & d)
									snake_case__			:				Optional[int]       =  0x5A827999
								elif 2_0 <= i < 4_0:
									snake_case__			:				Dict       =  b ^ c ^ d
									snake_case__			:				Optional[int]       =  0x6ED9EBA1
								elif 4_0 <= i < 6_0:
									snake_case__			:				str       =  (b & c) | (b & d) | (c & d)
									snake_case__			:				Union[str, Any]       =  0x8F1BBCDC
								elif 6_0 <= i < 8_0:
									snake_case__			:				Optional[Any]       =  b ^ c ^ d
									snake_case__			:				List[Any]       =  0xCA62C1D6
								snake_case__			:				Dict       =  (
								    self.rotate(_SCREAMING_SNAKE_CASE							,		5	) + f + e + k + expanded_block[i] & 0xFFFFFFFF,
								    a,
								    self.rotate(_SCREAMING_SNAKE_CASE							,		3_0	),
								    c,
								    d,
								)
							snake_case__			:				List[str]       =  (
							    self.h[0] + a & 0xFFFFFFFF,
							    self.h[1] + b & 0xFFFFFFFF,
							    self.h[2] + c & 0xFFFFFFFF,
							    self.h[3] + d & 0xFFFFFFFF,
							    self.h[4] + e & 0xFFFFFFFF,
							)
						return ("{:08x}" * 5).format(*self.h	)







def 					SCREAMING_SNAKE_CASE    (			):
	snake_case__			:				List[Any]       =  B"Test String"
	assert SHAaHash(__snake_case       ).final_hash() == hashlib.shaa(__snake_case       ).hexdigest()  # noqa: S324







def 					SCREAMING_SNAKE_CASE    (			):
	snake_case__			:				Optional[Any]       =  argparse.ArgumentParser(description="Process some strings or files"       )
	parser.add_argument(
	    "--string"					,  dest="input_string"					,  default="Hello World!! Welcome to Cryptography"					,  help="Hash the string"					,  )
	parser.add_argument("--file"					,  dest="input_file"					,  help="Hash contents of a file"       )
	snake_case__			:				Tuple       =  parser.parse_args()
	snake_case__			:				Union[str, Any]       =  args.input_string
	# In any case hash input should be a bytestring
	if args.input_file:
		with open(args.input_file					,  "rb"       ) as f:
			snake_case__			:				str       =  f.read()
	else:
		snake_case__			:				int       =  bytes(__snake_case					,  "utf-8"       )
	print(SHAaHash(__snake_case       ).final_hash()       )


if __name__ == "__main__":
	main()
	import doctest

	doctest.testmod()











def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							int					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float(moles / volume       ) * nfactor       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							float					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float((moles * 0.08_21 * temperature) / (volume)       )       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							float					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float((moles * 0.08_21 * temperature) / (pressure)       )       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							float					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float((pressure * volume) / (0.08_21 * moles)       )       )


if __name__ == "__main__":
	import doctest

	doctest.testmod()



