public byte[] decryptKeyblob(byte[] formattedKey, String passphrase)
throws InvalidKeyException {
try {
byte[] keyblob = getKeyBlob(formattedKey);
ByteArrayReader bar = new ByteArrayReader(keyblob);
String type = bar.readString();
if (type.equalsIgnoreCase("3des-cbc")) {
// Decrypt the key
byte[] keydata = makePassphraseKey(passphrase);
byte[] iv = new byte[8];