Replacing the Hybrid App Certificate Using the Admin API

Use the SUPMobileHybridApp.replaceMobileHybridAppCertificate() method to set or modify the certificate password context variable for the Hybrid App package.

InputStream is = getClass().getResourceAsStream("sybase101.p12");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buf = new byte[512];
int count;
while ((count = is.read(buf)) != -1) {
	baos.write(buf, 0, count);
}
is.close();
baos.flush();
baos.close();
MobileHybridAppIDVO hybridAppID = new MobileHybridAppIDVO();
hybridAppID.setWID(4);
hybridAppID.setVersion(1);

mobileHybridApp.replaceMobileHybridAppCertificate(hybridAppID,
		baos.toByteArray(), "password");