I am fairly certain that there is not a way to do this, but I figured I would ask anyway. The closest thing I have been able to find is grabbing the Base64 encoding, but that does not work for the idea. The idea is to safely pull any hash type (MD5, SHAs, ect.) of a file to drop into known malicious file repositories for analysis before downloading, all at the click of a button. Companies like Virus Total have APIs that make this possible, but Office-js doesn't seem to support the capability. Is anyone aware of a way to safely do this achieve the hash of attachments?
I am just learning JS and have exhausted my resources and understanding. To my limited knowledge, I think that it is impossible, but I am not fluent in terminology I have read, so I could be mistaken.
The Office JavaScript API doesn't provide anything for that without getting the attachment's data and calculating the hash on your own, see Get attachments of an Outlook item from the server for more information.
You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team goes through the planning process.