(string)
| 55 | }; |
| 56 | |
| 57 | let convertToWordArray = function(string) { |
| 58 | let lWordCount; |
| 59 | let lMessageLength = string.length; |
| 60 | let lNumberOfWordsTempOne = lMessageLength + 8; |
| 61 | let lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64; |
| 62 | let lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16; |
| 63 | let lWordArray = Array(lNumberOfWords - 1); |
| 64 | let lBytePosition = 0; |
| 65 | let lByteCount = 0; |
| 66 | while(lByteCount < lMessageLength) { |
| 67 | lWordCount = (lByteCount - (lByteCount % 4)) / 4; |
| 68 | lBytePosition = (lByteCount % 4) * 8; |
| 69 | lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); |
| 70 | lByteCount++; |
| 71 | } |
| 72 | lWordCount = (lByteCount - (lByteCount % 4)) / 4; |
| 73 | lBytePosition = (lByteCount % 4) * 8; |
| 74 | lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); |
| 75 | lWordArray[lNumberOfWords - 2] = lMessageLength << 3; |
| 76 | lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; |
| 77 | return lWordArray; |
| 78 | }; |
| 79 | |
| 80 | let wordToHex = function(lValue) { |
| 81 | let WordToHexValue = "", |
no outgoing calls
no test coverage detected
searching dependent graphs…