INNER CODE UNIT · JavaScript

j

norkator/cryptography · src/cryptography/other/hmac/IPM.js:60

				j = msg.charCodeAt(i) << 24 | msg.charCodeAt(i + 1) << 16 | msg.charCodeAt(i + 2) << 8 | msg.charCodeAt(i + 3);
				word_array.push( j );
			}

			switch(msg_len % 4)
			{
				case 0: i = 0x080000000; break;
				case 1: i = msg.charCodeAt(msg_len - 1) << 24 | 0x0800000; break;
				case 2: i = msg.charCodeAt(msg_len - 2) << 24 | msg.charCodeAt(msg_len-1) << 16 | 0x08000; break;
				case 3: i = msg.charCodeAt(msg_len - 3) << 24 | msg.charCodeAt(msg_len-2) << 16 | msg.charCodeAt(msg_len - 1) << 8 | 0x80; break;
			}

			word_array.push( i );
			while((word_array.length % 16) != 14) word_array.push( 0 );

			word_array.push(msg_len >>> 29);
			word_array.push((msg_len << 3) & 0x0ffffffff);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…