Player APIs (BrightScript & Ja...
...
Object Reference
Hashing and Storage Objects

roHashGenerator

4min
this object allows you to generate a variety of message digests the javascript equivalent is the node js crypto api object creation the hashing algorithm is specified when creating the rohashgenerator object createobject("rohashgenerator", algorithm as string) the algorithm parameter accepts the following strings "sha256" "sha384" "sha512" "sha1" "md5" "crc32" crc32 is only available on firmware versions 4 4 x or later ifhashgenerator hash(obj as object) as object hashes the payload, which can be supplied in the form of a string (or any object implementing ifstring ) or an robytearray the hash is returned as an robytearray sethmackey(key as dynamic) as boolean supplies a cryptographic key for the hashing function this method accepts a plain text key setobfuscatedhmackey(key as string) as boolean supplies a cryptographic key for the hashing function this method accepts a key that is obfuscated using a shared secret getfailurereason() as string