MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

hashes/sha1.py:41–50  ·  view source on GitHub ↗

Initiates the variables data and h. h is a list of 5 8-digit hexadecimal numbers corresponding to (1732584193, 4023233417, 2562383102, 271733878, 3285377520) respectively. We will start with this as a message digest. 0x is how you write hexadecimal numbers in

(self, data)

Source from the content-addressed store, hash-verified

39 """
40
41 def __init__(self, data):
42 """
43 Initiates the variables data and h. h is a list of 5 8-digit hexadecimal
44 numbers corresponding to
45 (1732584193, 4023233417, 2562383102, 271733878, 3285377520)
46 respectively. We will start with this as a message digest. 0x is how you write
47 hexadecimal numbers in Python
48 """
49 self.data = data
50 self.h = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]
51
52 @staticmethod
53 def rotate(n, b):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected