OpenSSL.Core.Native.ExpectSuccess C# (CSharp) Method

ExpectSuccess() public static method

public static ExpectSuccess ( int ret ) : int
ret int
return int
        public static int ExpectSuccess(int ret)
        {
            if (ret <= 0)
                throw new OpenSslException();
            return ret;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Calls RAND_pseudo_bytes()
 /// </summary>
 /// <param name="len"></param>
 /// <returns></returns>
 public static byte[] PseudoBytes(int len)
 {
     byte[] buf = new byte[len];
     Native.ExpectSuccess(Native.RAND_pseudo_bytes(buf, buf.Length));
     return(buf);
 }
All Usage Examples Of OpenSSL.Core.Native::ExpectSuccess
Native