[encryption] always take unencrypted size

make sure that we use the unencrypted size

fix #9366 

cc @PVince81