public static byte[] Random(int bytes) { if (!fSeeded) { Seed(); } byte[] buf = new byte[bytes]; if (OpenSSL.RAND_bytes(buf, bytes) == 1) { return(buf); } else { uint err = OpenSSL.ERR_get_error(); throw new OpenSSLException(Encoding.ASCII.GetString(OpenSSL.ERR_get_error_string(err, null))); } }