public static byte[] calculateHash(final byte[] identityKey, final byte[] random, final byte[] src) {
        final int length = HASH_PADDING.length + random.length + src.length;
        final ByteBuffer bufferHashInput = ByteBuffer.allocate(length).order(ByteOrder.BIG_ENDIAN);
        bufferHashInput.put(HASH_PADDING);
        bufferHashInput.put(random);
        bufferHashInput.put(src);
        final byte[] hashInput = bufferHashInput.array();
        final byte[] hash = SecureUtils.encryptWithAES(hashInput, identityKey);

        final ByteBuffer buffer = ByteBuffer.allocate(HASH_LENGTH).order(ByteOrder.BIG_ENDIAN);
        buffer.put(hash, 8, HASH_LENGTH);

        return buffer.array();
    }
Calculates hash value for advertising with node id

@param identityKey resolving identity key
@param random      64-bit random value
@param src         unicast address of the node
@return hash value
mesh/src/main/java/no/nordicsemi/android/mesh/utils/SecureUtils.java