阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js crypto.timingSafeEqual

      Node.js crypto.timingSafeEqual(a, b)

      新增于: v6.6.0

      • a < Buffer> ||
      • b < Buffer> ||
      • Returns: < boolean>

      This function is based on a constant-time algorithm. Returns true if a is equal to b, without leaking timing information that would allow an attacker to guess one of the values. This is suitable for comparing HMAC digests or secret values like authentication cookies or

      a and b must both be Buffers, TypedArrays, or DataViews, and they must have the same length.

      Use of crypto.timingSafeEqual does not guarantee that the surrounding code is timing-safe. Care should be taken to ensure that the surrounding code does not introduce timing vulnerabilities.


      更多内容请参考:Node.js crypto 加密,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录