Search in sources :

Example 1 with TeeInputStream

use of org.bouncycastle.util.io.TeeInputStream in project robovm by robovm.

the class CMSUtils method attachDigestsToInputStream.

static InputStream attachDigestsToInputStream(Collection digests, InputStream s) {
    InputStream result = s;
    Iterator it = digests.iterator();
    while (it.hasNext()) {
        DigestCalculator digest = (DigestCalculator) it.next();
        result = new TeeInputStream(result, digest.getOutputStream());
    }
    return result;
}
Also used : ASN1InputStream(org.bouncycastle.asn1.ASN1InputStream) TeeInputStream(org.bouncycastle.util.io.TeeInputStream) InputStream(java.io.InputStream) Iterator(java.util.Iterator) DigestCalculator(org.bouncycastle.operator.DigestCalculator) TeeInputStream(org.bouncycastle.util.io.TeeInputStream)

Aggregations

InputStream (java.io.InputStream)1 Iterator (java.util.Iterator)1 ASN1InputStream (org.bouncycastle.asn1.ASN1InputStream)1 DigestCalculator (org.bouncycastle.operator.DigestCalculator)1 TeeInputStream (org.bouncycastle.util.io.TeeInputStream)1