code: private byte[] getSha256(byte[] data) throws NoSuchAlgorithmException {
          MessageDigest digest = MessageDigest.getInstance("SHA-256");
          return digest.digest(data);
      }
docs: Get SHA256 hash for byte array.
  
  @param data
  byte array.
  
  @return byte array with sha256 hash.