// Token: 0x06000088 RID: 136 RVA: 0x00006FE0 File Offset: 0x000051E0 private static DigestRandomGenerator CreatePrng(string digestName, bool autoSeed) { IDigest digest = DigestUtilities.GetDigest(digestName); if (digest == null) { return(null); } DigestRandomGenerator digestRandomGenerator = new DigestRandomGenerator(digest); if (autoSeed) { digestRandomGenerator.AddSeedMaterial(SecureRandom.NextCounterValue()); digestRandomGenerator.AddSeedMaterial(SecureRandom.GetNextBytes(SecureRandom.Master, digest.GetDigestSize())); } return(digestRandomGenerator); }
private static byte[] CreateIV(SecureRandom random, int ivLength) { return(SecureRandom.GetNextBytes(random, ivLength)); }