io.gatling.recorder.internal.bouncycastle.pqc.jcajce.provider.lms.DigestUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gatling-recorder-bc-shaded Show documentation
Show all versions of gatling-recorder-bc-shaded Show documentation
Shaded BouncyCastle for Gatling Recorder
package io.gatling.recorder.internal.bouncycastle.pqc.jcajce.provider.lms;
import io.gatling.recorder.internal.bouncycastle.crypto.Digest;
import io.gatling.recorder.internal.bouncycastle.crypto.Xof;
class DigestUtil
{
public static byte[] getDigestResult(Digest digest)
{
byte[] hash = new byte[digest.getDigestSize()];
if (digest instanceof Xof)
{
((Xof)digest).doFinal(hash, 0, hash.length);
}
else
{
digest.doFinal(hash, 0);
}
return hash;
}
}