發表文章

目前顯示的是 8月, 2017的文章

PHP彷JWT打包產生需要的資料,把回傳回來的資料驗證解碼

執行: http://sandbox.onlinephpfunctions.com/code/8349c158d68cdf644dd07d802f3782384fb4e7b7 使用範例: 加密的密碼 $salt = '11223344'; // 需要傳遞的陣列 $codevalue_array = array(   'Amt' => '111',   'MerchantOrderNo' => 'ertgyhujioiuytre' ); // 打包產生需要的資料 $send_code = jwtenc($salt,$codevalue_array); var_dump($send_code); // 把回傳回來的資料驗證解碼 $codevalue = jwtdec($salt,$send_code); var_dump($codevalue);

JS 產生亂數(前2碼英文小寫,後6碼數字)

圖片
程式碼 RUN test: https://jsbin.com/moqusix/3/edit?html,js,output ref: https://www.w3schools.com/jsref/prop_html_innerhtml.asp https://github.com/mtchang/code/blob/master/myrandomstring.html