}
if len(src) > 0 {
if x.enc == cbcEncrypt {
- cryptBlocksChain(&src[0], &dst[0], len(src), &x.b.enc[0], &x.iv[0], x.enc, len(x.b.enc)/4-1)
+ cryptBlocksChain(&src[0], &dst[0], len(src), &x.b.enc[0], &x.iv[0], x.enc, int(x.b.l)/4-1)
} else {
- cryptBlocksChain(&src[0], &dst[0], len(src), &x.b.dec[0], &x.iv[0], x.enc, len(x.b.dec)/4-1)
+ cryptBlocksChain(&src[0], &dst[0], len(src), &x.b.dec[0], &x.iv[0], x.enc, int(x.b.l)/4-1)
}
}
}
// counterCryptASM implements counterCrypt which then allows the loop to
// be unrolled and optimized.
func (g *gcmAsm) counterCrypt(out, in []byte, counter *[gcmBlockSize]byte) {
- counterCryptASM(len(g.cipher.enc)/4-1, out, in, counter, &g.cipher.enc[0])
+ counterCryptASM(int(g.cipher.l)/4-1, out, in, counter, &g.cipher.enc[0])
+
}
// increments the rightmost 32-bits of the count value by 1.