BIO_new() приватный Метод

private BIO_new ( IntPtr type ) : IntPtr
type System.IntPtr
Результат System.IntPtr
Пример #1
0
        /// <summary>
        /// Factory method that calls BIO_new() with BIO_f_md()
        /// </summary>
        /// <param name="md"></param>
        /// <returns></returns>
        public static BIO MessageDigest(MessageDigest md)
        {
            IntPtr ptr = Native.ExpectNonNull(Native.BIO_new(Native.BIO_f_md()));

            Native.BIO_set_md(ptr, md.Handle);
            return(new BIO(ptr, true));
        }
Пример #2
0
        /// <summary>
        /// Calls BIO_new(BIO_s_mem())
        /// </summary>
        /// <param name="takeOwnership"></param>
        /// <returns></returns>
        public static BIO MemoryBuffer(bool takeOwnership)
        {
            var ptr = Native.ExpectNonNull(Native.BIO_new(Native.BIO_s_mem()));

            return(new BIO(ptr, takeOwnership));
        }
Пример #3
0
 /// <summary>
 /// Calls BIO_new(BIO_s_mem()) and then BIO_write() the buf
 /// </summary>
 /// <param name="buf"></param>
 public BIO(byte[] buf)
     : base(Native.ExpectNonNull(Native.BIO_new(Native.BIO_s_mem())), true)
 {
     Write(buf);
 }