static IVGenerator() { arcfour = new ARCFOUREncryption(); long time = SystemUtil.GetTimeBasedSeed(); long mem = SystemUtil.GetFreeMemory(); String s = time + "+" + mem; arcfour.PrepareARCFOURKey(s.GetBytes(iText.IO.Util.EncodingUtil.ISO_8859_1)); }
static IVGenerator() { arcfour = new ARCFOUREncryption(); long time = SystemUtil.GetSystemTimeTicks(); long mem = SystemUtil.GetFreeMemory(); String s = time + "+" + mem; arcfour.PrepareARCFOURKey(s.GetBytes()); }
public static byte[] GenerateNewDocumentId() { IDigest md5; try { md5 = DigestUtilities.GetDigest("MD5"); } catch (Exception e) { throw new PdfException(PdfException.PdfEncryption, e); } long time = SystemUtil.GetTimeBasedSeed(); long mem = SystemUtil.GetFreeMemory(); String s = time + "+" + mem + "+" + (seq++); return(md5.Digest(s.GetBytes(iText.IO.Util.EncodingUtil.ISO_8859_1))); }
public static byte[] GenerateNewDocumentId() { IDigest md5; try { md5 = Org.BouncyCastle.Security.DigestUtilities.GetDigest("MD5"); } catch (Exception e) { throw new PdfException(PdfException.PdfEncryption, e); } long time = SystemUtil.GetSystemTimeTicks(); long mem = SystemUtil.GetFreeMemory(); String s = time + "+" + mem + "+" + (seq++); return(md5.Digest(s.GetBytes())); }