You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: compare_test.go
    path of file: ./repos/themis/gothemis/compare
    
    the code of the file until where you have to start completion: package compare

import (
	"crypto/rand"
	"math/big"
	"testing"
)

func genRandData() ([]byte, error) {
	dataLength, err := rand.Int(rand.Reader, big.NewInt(256))
	if nil != err {
		return nil, err
	}
	size := dataLength.Int64()
	if size == 0 {
		size = 1
	}

	data := make([]byte, size)
	_, err = rand.Read(data)
	if nil != err {
		return nil, err
	}

	return data, nil
}

func scService(sc *SecureCompare, ch chan []byte, finCh chan i
    
func scService(sc *SecureCompare, ch chan []byte, finCh chan int, t *testing.T) {
	res, err := sc.Result()
	if err != nil {
		t.Error(err)
		finCh <- NotReady
		return
	}

	for NotReady == res {
		buf := <-ch

		buf, err := sc.Proceed(buf)
		if err != nil {
			t.Error(err)
			finCh <- NotReady
			return
		}

		if nil != buf {
			ch <- buf
		}

		res, err = sc.Result()
		if err != nil {
			t.Error(err)
			finCh <- NotReady
			return
		}
	}

	finCh <- res
}