Actually use our threadLocal. Do'h
This commit is contained in:
parent
18f5ed3102
commit
aa1a871967
@ -38,6 +38,7 @@ public class CipherBase
|
|||||||
if ( heapIn.length < readableBytes )
|
if ( heapIn.length < readableBytes )
|
||||||
{
|
{
|
||||||
heapIn = new byte[ readableBytes ];
|
heapIn = new byte[ readableBytes ];
|
||||||
|
heapInLocal.set( heapIn );
|
||||||
}
|
}
|
||||||
in.readBytes( heapIn, 0, readableBytes );
|
in.readBytes( heapIn, 0, readableBytes );
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ public class CipherBase
|
|||||||
if ( heapOut.length < outputSize )
|
if ( heapOut.length < outputSize )
|
||||||
{
|
{
|
||||||
heapOut = new byte[ outputSize ];
|
heapOut = new byte[ outputSize ];
|
||||||
|
heapOutLocal.set( heapOut );
|
||||||
}
|
}
|
||||||
out.writeBytes( heapOut, 0, cipher.update( heapIn, 0, readableBytes, heapOut ) );
|
out.writeBytes( heapOut, 0, cipher.update( heapIn, 0, readableBytes, heapOut ) );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user