OpenSSL.Core.BIO.MemoryBuffer C# (CSharp) Method

MemoryBuffer() public static method

Factory method that calls BIO_new() with BIO_s_mem()
public static MemoryBuffer ( ) : BIO
return BIO
		public static BIO MemoryBuffer()
		{
			return MemoryBuffer(true);
		}

Same methods

BIO::MemoryBuffer ( bool takeOwnership ) : BIO

Usage Example

Example #1
0
        private static DateTime AsnTimeToDateTime(IntPtr ptr)
        {
            string str;

            using (BIO bio = BIO.MemoryBuffer())
            {
                Native.ExpectSuccess(Native.ASN1_UTCTIME_print(bio.Handle, ptr));
                str = bio.ReadString();
            }
            string[] fmts =
            {
                "MMM  d HH:mm:ss yyyy G\\MT",
                "MMM dd HH:mm:ss yyyy G\\MT"
            };
            return(DateTime.ParseExact(str, fmts, new DateTimeFormatInfo(), DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal));
        }
All Usage Examples Of OpenSSL.Core.BIO::MemoryBuffer