int sha1InputLength = seed.length;
for(int j=0; j<dictionary.getRecipientsLength(); j++)
{
COSString string = dictionary.getRecipientStringAt(j);
sha1InputLength += string.getBytes().length;
}
byte[] sha1Input = new byte[sha1InputLength];
System.arraycopy(seed, 0, sha1Input, 0, 20);
int sha1InputOffset = 20;
for(int j=0; j<dictionary.getRecipientsLength(); j++)
{
COSString string = dictionary.getRecipientStringAt(j);
System.arraycopy(
string.getBytes(), 0,
sha1Input, sha1InputOffset, string.getBytes().length);
sha1InputOffset += string.getBytes().length;
}
MessageDigest sha1 = MessageDigests.getSHA1();
byte[] mdResult = sha1.digest(sha1Input);