< prev index next >

src/java.base/share/classes/sun/security/provider/ByteArrayAccess.java

Print this page
rev 14166 : 8051408: NIST SP 800-90A SecureRandom implementations

*** 446,457 **** long i = in[inOfs++]; out[outOfs++] = (byte)(i >> 56); out[outOfs++] = (byte)(i >> 48); out[outOfs++] = (byte)(i >> 40); out[outOfs++] = (byte)(i >> 32); ! out[outOfs++] = (byte)(i >> 24); ! out[outOfs++] = (byte)(i >> 16); ! out[outOfs++] = (byte)(i >> 8); ! out[outOfs++] = (byte)(i ); } } } --- 446,459 ---- long i = in[inOfs++]; out[outOfs++] = (byte)(i >> 56); out[outOfs++] = (byte)(i >> 48); out[outOfs++] = (byte)(i >> 40); out[outOfs++] = (byte)(i >> 32); ! if (outOfs < len) { // SHA-512/224 is 28 bytes ! out[outOfs++] = (byte) (i >> 24); ! out[outOfs++] = (byte) (i >> 16); ! out[outOfs++] = (byte) (i >> 8); ! out[outOfs++] = (byte) (i); ! } } } }
< prev index next >