*
* @return Contentinfo with contentType Data.
*/
private ContentInfo makeData(SafeContents safe) throws IOException,
ASN1Exception {
Data data = null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DEREncoder encoder = new DEREncoder(baos);
safe.encode(encoder);
data = new Data(baos.toByteArray());
baos.close();
ContentInfo cInfo = new ContentInfo(data);
return cInfo;
}