package com.legalPersonMonitor.signature.impl;

import cn.com.jit.assp.css.client.util.Base64;
import cn.com.jit.assp.dsign.DSign;
import com.legalPersonMonitor.signature.SignatureI;


public class OldSignatureImpl implements SignatureI {
    @Override
    public  byte[] signature(String dn,String strDigestAlg,byte[] data) {
        DSign dSign = new DSign();
        DSign.init("./config/cssconfig.properties");
        String signResultString = dSign.p1Sign(dn,strDigestAlg, data);
        byte[] signResultByte = Base64.decode(signResultString);
        return signResultByte;
    }
}
