public static extern int RAND_bytes(byte[] buf, int num);
/// <summary> /// Calls RAND_bytes() /// </summary> /// <param name="len"></param> /// <returns></returns> public static byte[] Bytes(int len) { var buf = new byte[len]; Native.ExpectSuccess(Native.RAND_bytes(buf, len)); return(buf); }