<?php

namespace App\Http\Controllers\API\Internal;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class HsmController extends Controller
{
    //加密
    public function Encrypt(){
        $string =request('string');
        $HSM=\App\Lib\HSM::HsmEncrypt($string);
        if($HSM['status']!=true){
            return \Yz::echoError1('调用HSM加密失败');
        }
        return \Yz::Return(true,'加密成功',$HSM['data']);
    }
}
