Here you can find the source of sumSqual(byte[] b)
private static int sumSqual(byte[] b)
//package com.java2s; public class Main { private static int sumSqual(byte[] b) { int sum = 0; for (int i = 0; i < b.length; i++) { sum += (int) Math.pow(b[i], 2); }// w w w . java2 s . c o m return sum; } }