}
}
Arrays.sort(encryptionServiceReferences);
for (ServiceReference ref : encryptionServiceReferences) {
try {
EncryptionService encryptionService = (EncryptionService) bundleContext.getService(ref);
if (encryptionService != null) {
try {
encryption = encryptionService.createEncryption(encOpts);
if (encryption != null) {
break;
}
} finally {
bundleContext.ungetService(ref);