public static string getcertsn(x509certificate cf) throws alipayapiexception {
try {
messagedigest md = messagedigest.getinstance("md5");
md.update((cf.getissuerx500principal().getname() cf.getserialnumber()).getbytes());
string certsn = new biginteger(1, md.digest()).tostring(16);
certsn = fillmd5(certsn);
return certsn;
} catch (nosuchalgorithmexception e) {
throw new alipayapiexception(e);
}
}