/** Creates a new instance of SHAInterleave @exception ProviderException thrown if MessageDigest.getInstance("SHA") throws a NoSuchAlgorithmException. */ public SHAInterleave() { try { sha = MessageDigest.getInstance("SHA"); } catch(NoSuchAlgorithmException e) { throw PicketBoxMessages.MESSAGES.failedToObtainSHAMessageDigest(e); } evenBytes = new ByteArrayOutputStream(); oddBytes = new ByteArrayOutputStream(); engineReset(); }
/** Creates a new instance of SHAInterleave @exception ProviderException thrown if MessageDigest.getInstance("SHA") throws a NoSuchAlgorithmException. */ public SHAInterleave() { try { sha = MessageDigest.getInstance("SHA"); } catch(NoSuchAlgorithmException e) { throw new ProviderException("Failed to obtain SHA MessageDigest"); } evenBytes = new ByteArrayOutputStream(); oddBytes = new ByteArrayOutputStream(); engineReset(); }
for(int i = 0; i < H.length; ++i) digest[2 * i + 1] = H[i]; engineReset(); return digest;
for(int i = 0; i < H.length; ++i) digest[2 * i + 1] = H[i]; engineReset(); return digest;