Method for PKCS#7 generation