class_docstr: RFC 2104 HMAC class.  Also complies with RFC 4231.
  
  This supports the API for Cryptographic Hash Functions (PEP 247).
docstr: Create a new HMAC object.
  
  key: bytes or buffer, key for the keyed hash object.
  msg: bytes or buffer, Initial input for the hash or None.
  digestmod: A hash name suitable for hashlib.new(). *OR*
             A hashlib constructor returning a new hash object. *OR*
             A module supporting PEP 247.
  
             Required as of 3.8, despite its position after the optional
             msg argument.  Passing it as a keyword argument is
             recommended, though not required for legacy API reasons.
docstr_tok: ["Create","a","new","HMAC","object",".","key",":","bytes","or","buffer",",","key","for","the","keyed","hash","object",".","msg",":","bytes","or","buffer",",","Initial","input","for","the","hash","or","None",".","digestmod",":","A","hash","name","suitable","for","hashlib.new","(",")",".","*","OR","*","A","hashlib","constructor","returning","a","new","hash","object",".","*","OR","*","A","module","supporting","PEP","247",".","Required","as","of","3.8",",","despite","its","position","after","the","optional","msg","argument",".","Passing","it","as","a","keyword","argument","is","recommended",",","though","not","required","for","legacy","API","reasons","."]
code: def __init__(self, key, msg=None, digestmod=""):
      """Create a new HMAC object.
  
      key: bytes or buffer, key for the keyed hash object.
      msg: bytes or buffer, Initial input for the hash or None.
      digestmod: A hash name suitable for hashlib.new(). *OR*
                 A hashlib constructor returning a new hash object. *OR*
                 A module supporting PEP 247.
  
                 Required as of 3.8, despite its position after the optional
                 msg argument.  Passing it as a keyword argument is
                 recommended, though not required for legacy API reasons.
      """
  
      if not isinstance(key, (bytes, bytearray)):
          raise TypeError(
              "key: expected bytes or bytearray, but got %r"
              % type(key).__name__
          )
  
      if not digestmod:
          raise TypeError("Missing required parameter 'digestmod'.")
  
      if _hashopenssl and isinstance(digestmod, (str, _functype)):
          try:
              self._init_hmac(key, msg, digestmod)
          except _hashopenssl.UnsupportedDigestmodError:
              self._init_old(key, msg, digestmod)
      else:
          self._init_old(key, msg, digestmod)
  
file_path: catboost/contrib/tools/python3/src/Lib/hmac.py
imports: import warnings
  import hashlib
label_desc: Use image node_id 1 to create a new HMAC object  with example: obj = HMAC(key, msg, digestmod)