HMAC-SHA256 Algorithm for signature calculation

后端 未结 9 695
北海茫月
北海茫月 2020-12-12 19:27

I am trying to create a signature using the HMAC-SHA256 algorithm and this is my code. I am using US ASCII encoding.

final Charset asciiCs = Charset.forName(         


        
9条回答
  •  -上瘾入骨i
    2020-12-12 20:16

    If you're using Guava, its latest release now lets you use

     Hashing.hmacSha256()
    

    Further documentation here: https://guava.dev/releases/23.0/api/docs/com/google/common/hash/Hashing.html#hmacSha256-byte:A-

提交回复
热议问题