public String generateHeader() {
		StringBuilder builder = new StringBuilder();
		append(builder, NLS.str("certificate.cert_type"), x509cert.getType());
		append(builder, NLS.str("certificate.serialSigVer"), ((Integer) x509cert.getVersion()).toString());
		// serial number
		append(builder, NLS.str("certificate.serialNumber"), "0x" + x509cert.getSerialNumber().toString(16));

		// Get subject
		Principal subjectDN = x509cert.getSubjectDN();
		append(builder, NLS.str("certificate.cert_subject"), subjectDN.getName());

		append(builder, NLS.str("certificate.serialValidFrom"), x509cert.getNotBefore().toString());
		append(builder, NLS.str("certificate.serialValidUntil"), x509cert.getNotAfter().toString());
		return builder.toString();
	}
@Test
	public void decodeRSAKeyHeader() {
		assertThat(certificateManagerRSA.generateHeader())
				.contains("X.509")
				.contains("0x4bd68052")
				.contains("CN=test cert, OU=test unit, O=OOO TestOrg, L=St.Peterburg, ST=Russia, C=123456");
	}