func Test_NoPlainTextInDisk(t *testing.T) {
	tempFile, _ := ioutil.TempFile(os.TempDir(), "lala")
	defer deferredCleanup(tempFile)
	data := crypto.RandBytes(128)
	f, _ := CreateExt(tempFile.Name(), password, crypto.MinSCryptParameters, BEBlockSize, 1)
	for i := 0; i < 100; i++ {
		_, _ = f.Write(data)
	}
	_ = f.Close()
	rf, _ := os.Open(tempFile.Name())
	raw, _ := ioutil.ReadAll(rf)
	if bytes.Contains(raw, data) {
		t.Fatal("encryption might not be working")
	}
}
"trivial" test but necessary during the implementation, also maybe a good safety guard to leave around
package seof
import (
	"bytes"
	"encoding/binary"
	"encoding/hex"
	"fmt"
	"github.com/kuking/seof/crypto"
	"io"
	"io/ioutil"
	"os"
	"testing"
)
func Test_HappySequentialWriteRead(t *testing.T) {
	tempFile, _ := ioutil.TempFile(os.TempDir(), "lala")
	defer deferredCleanup(tempFile)
	data := crypto.RandBytes(BEBlockSize*3 + BEBlockSize/3)
	f, err := CreateExt(tempFile.Name(), password, crypto.MinSCryptParameters, BEBlockSize, 1)
	assertNoErr(err, t)
	n, err := f.Write(data)
	assertNoErr(err, t)
	if n != len(data) {
		t.Fatal("did not write the whole buffer")
	}
	err = f.Close()
	assertNoErr(err, t)
	f, err = OpenExt(tempFile.Name(), password, 1)
	assertNoErr(err, t)
	readBuf := make([]byte, BEBlockSize*5)  
	n, err = f.Read(readBuf)
	if n != len(data) {
		t.Fatal("It did not read fully")
	}
	if !bytes.Equal(data, readBuf[0:n]) {
		t.Fatal("read error, does not equals to initial write")
	}
	err = f.Close()
	assertNoErr(err, t)
}