com.baidubce.services.lss
Class LssUtils

java.lang.Object
  extended by com.baidubce.services.lss.LssUtils

public class LssUtils
extends Object

Created by shidaiting01 on 2016/3/24.


Constructor Summary
LssUtils()
           
 
Method Summary
static String hmacSha256(byte[] input, byte[] secretKey)
           
static String hmacSha256(byte[] input, int offset, int length, byte[] secretKey)
           
static String hmacSha256(String input, String secretKey)
          Encodes the input String using the UTF8 charset and calls hmacSha256;
static byte[] mac(byte[] input, int offset, int length, SecretKey secretKey)
           
static byte[] mac(byte[] input, SecretKey secretKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LssUtils

public LssUtils()
Method Detail

hmacSha256

public static String hmacSha256(String input,
                                String secretKey)
Encodes the input String using the UTF8 charset and calls hmacSha256;

Parameters:
input - data to calculate mac
secretKey - secret key
Returns:
String, sha256 mac

hmacSha256

public static String hmacSha256(byte[] input,
                                byte[] secretKey)

hmacSha256

public static String hmacSha256(byte[] input,
                                int offset,
                                int length,
                                byte[] secretKey)

mac

public static byte[] mac(byte[] input,
                         SecretKey secretKey)

mac

public static byte[] mac(byte[] input,
                         int offset,
                         int length,
                         SecretKey secretKey)


Copyright © 2018. All rights reserved.