@SuppressWarnings("RedundantCollectionOperation")
    public static byte getSupportedAlgorithmValue(final List<AlgorithmType> supportedAlgorithmByNode) {
        final List<AlgorithmType> provisionerSupportedAlgorithms = Arrays.asList(AlgorithmType.values());
        Collections.reverse(supportedAlgorithmByNode);
        for (AlgorithmType algorithmType : supportedAlgorithmByNode) {
            for (AlgorithmType provisionerSupportedAlgorithm : provisionerSupportedAlgorithms) {
                if (provisionerSupportedAlgorithm == algorithmType)
                    return provisionerSupportedAlgorithm.value;
            }
        }
        throw new IllegalArgumentException("Unsupported algorithm!");
    }
Returns the supported algorithm value

@param supportedAlgorithmByNode List of supported algorithms by the provisioner
@return supported algorithm value
mesh/src/main/java/no/nordicsemi/android/mesh/utils/AlgorithmType.java