private byte[] decrypt(@NonNull final AccessMessage accessMessage, @NonNull List<ApplicationKey> keys, final byte[] nonce, final int transportMicLength) {
        for (ApplicationKey key : keys) {
            if (key.getAid() == accessMessage.getAid()) {
                try {
                    return SecureUtils
                            .decryptCCM(accessMessage.getUpperTransportPdu(), key.getKey(), nonce, transportMicLength);
                } catch (Exception ex) {
                    // Retrying decryption.
                }

            }
            if (key.getOldAid() == accessMessage.getAid()) {
                try {
                    return SecureUtils
                            .decryptCCM(accessMessage.getUpperTransportPdu(), key.getKey(), nonce, transportMicLength);
                } catch (Exception ex) {
                    // Retrying decryption.
                }
            }
        }
        return null;
    }
Returns the decrypted upper transport pdu

@param accessMessage Access message object containing the upper transport pdu
mesh/src/main/java/no/nordicsemi/android/mesh/transport/UpperTransportLayer.java