src/share/classes/sun/security/provider/DigestBase.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk Cdiff src/share/classes/sun/security/provider/DigestBase.java

src/share/classes/sun/security/provider/DigestBase.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 120,141 **** implCompress(buffer, 0); bufOfs = 0; } } // compress complete blocks ! while (len >= blockSize) { ! implCompress(b, ofs); ! len -= blockSize; ! ofs += blockSize; } // copy remainder to buffer if (len > 0) { System.arraycopy(b, ofs, buffer, 0, len); bufOfs = len; } } // reset this object. See JCA doc. protected final void engineReset() { if (bytesProcessed == 0) { // already reset, ignore return; --- 120,149 ---- implCompress(buffer, 0); bufOfs = 0; } } // compress complete blocks ! if (len >= blockSize) { ! int limit = ofs + len; ! ofs = implCompressMultiBlock(b, ofs, limit - blockSize); ! len = limit - ofs; } // copy remainder to buffer if (len > 0) { System.arraycopy(b, ofs, buffer, 0, len); bufOfs = len; } } + // compress complete blocks + protected final int implCompressMultiBlock(byte[] b, int ofs, int limit) { + for (; ofs <= limit; ofs += blockSize) { + implCompress(b, ofs); + } + return ofs; + } + // reset this object. See JCA doc. protected final void engineReset() { if (bytesProcessed == 0) { // already reset, ignore return;
src/share/classes/sun/security/provider/DigestBase.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File