net.polyv.vod.v1.util
类 VodSignUtil

java.lang.Object
  继承者 net.polyv.vod.v1.util.VodSignUtil

public class VodSignUtil
extends Object

polyv 直播签名工具类


构造方法摘要
VodSignUtil()
           
 
方法摘要
static String generateUUID()
           
static String getSha1(String input)
          sha1算法签名
static String getSign(Map<String,String> params, String secretKey)
          点播签名方法
static String mapJoinEncode(Map<String,String> map, boolean keyLower, boolean valueUrlEncode)
          url 参数串连
static String mapJoinNotEncode(Map<String,String> map)
          url 参数串连但是不进行参数Encode
static String setVodSign(Map<String,String> params, String appSecret)
          获取加密串
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

VodSignUtil

public VodSignUtil()
方法详细信息

generateUUID

public static String generateUUID()

setVodSign

public static String setVodSign(Map<String,String> params,
                                String appSecret)
                         throws NoSuchAlgorithmException,
                                UnsupportedEncodingException
获取加密串

抛出:
NoSuchAlgorithmException
UnsupportedEncodingException

getSign

public static String getSign(Map<String,String> params,
                             String secretKey)
                      throws NoSuchAlgorithmException,
                             UnsupportedEncodingException
点播签名方法

参数:
params - 签名参数
secretKey - 签名密钥
返回:
签名
抛出:
NoSuchAlgorithmException - 异常异常
UnsupportedEncodingException

getSha1

public static String getSha1(String input)
                      throws NoSuchAlgorithmException,
                             UnsupportedEncodingException
sha1算法签名

参数:
input - 签名原始字符串
返回:
签名
抛出:
NoSuchAlgorithmException - 签名异常
UnsupportedEncodingException

mapJoinNotEncode

public static String mapJoinNotEncode(Map<String,String> map)
url 参数串连但是不进行参数Encode

参数:
map - map
返回:
string

mapJoinEncode

public static String mapJoinEncode(Map<String,String> map,
                                   boolean keyLower,
                                   boolean valueUrlEncode)
                            throws UnsupportedEncodingException
url 参数串连

参数:
map - map
keyLower - keyLower
valueUrlEncode - valueUrlEncode
返回:
string
抛出:
UnsupportedEncodingException


Copyright © 2020. All Rights Reserved.