22 lines
529 B
Kotlin
22 lines
529 B
Kotlin
|
|
package com.gamedog.vididin.request
|
||
|
|
|
||
|
|
import com.ama.core.architecture.util.MD5Util
|
||
|
|
|
||
|
|
class RequestUtil private constructor(){
|
||
|
|
companion object {
|
||
|
|
const val Request_APPId = "video1"
|
||
|
|
const val Request_Sceret = "secret1"
|
||
|
|
|
||
|
|
fun getTimestampSec(): Long {
|
||
|
|
return System.currentTimeMillis()/1000
|
||
|
|
}
|
||
|
|
|
||
|
|
fun getRequestSign(timeSec: Long): String {
|
||
|
|
val signOrigin = "$Request_APPId-${timeSec}-$Request_Sceret"
|
||
|
|
return MD5Util.md5(signOrigin)?:""
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|