OgahTerkenal

OteHmacSha256

Library "OteHmacSha256"
Library to use HMAC SHA-256 by OgahTerkenal

hmac_sha256(string) HMAC SHA-256
  Parameters:
    string: msg String to be hashed
  Returns: Return a hashed string in hex format and an array of 8 32 bits integer

Library to use HMAC SHA-256 for authenticating alert message going out from TradingView.
It has limitation on allowed characters (because PineScript cannot access the underlying bits of each ASCII) from ASCII 32 to 126 only.
Usage Example section at the end of the source code pretty much tell everything about this library.
General example as how to import to your PineScript code is not included (please refer to the PineScript manual).
Release Notes:
Library "OteHmacSha256"
Library to use HMAC SHA-256 by OgahTerkenal

hmac_sha256(string)
  HMAC SHA-256
  Parameters:
    string: msg String to be hashed
  Returns: Return a hashed string in hex format and an array of 8 32 bits integer

Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this library?

Copy the following line and paste it in your script.