| 3782 | const result = text.length ? text.match(/^[a-fA-F0-9]+$/gi) : null; |
| 3783 | return result && result[0] ? result[0].toLowerCase() : null; |
| 3784 | } |
| 3785 | |
| 3786 | function getChecksumMessage (checksum, apk, displayChecksum) { |
| 3787 | let text = ''; |
| 3788 | if (displayChecksum) { |
| 3789 | text += '<code>' + checksum + '</code> is a '; |
| 3790 | if (apk.hashAlgorithm) { |
| 3791 | text += '<b>' + toDisplayAlgorithm(apk.hashAlgorithm) + '</b> '; |
| 3792 | } |
| 3793 | text += 'hash that '; |
| 3794 | } else { |
| 3795 | text += 'This '; |
| 3796 | if (apk.hashAlgorithm) { |
| 3797 | text += '<b>' + toDisplayAlgorithm(apk.hashAlgorithm) + '</b> '; |
| 3798 | } |
| 3799 | text += 'hash '; |
| 3800 | } |
| 3801 | |