public class SKITest extends org.junit.Assert {
@org.junit.Test
public void testRSA1024() throws Exception {
// Load the keystore
Crypto crypto = new Merlin();
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
ClassLoader loader = Loader.getClassLoader(SKITest.class);
InputStream input = Merlin.loadInputStream(loader, "keys/wss40_server.jks");
keyStore.load(input, "security".toCharArray());
((Merlin)crypto).setKeyStore(keyStore);
CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
cryptoType.setAlias("wss40_server");
X509Certificate[] certs = crypto.getX509Certificates(cryptoType);
assertTrue(certs != null && certs.length > 0);
byte[] skiBytes = crypto.getSKIBytesFromCert(certs[0]);
String knownBase64Encoding = "TFM0+4PSEUvWgzeLu28btvYR4BQ=";
assertTrue(knownBase64Encoding.equals(Base64.encode(skiBytes)));
}