public int Final(byte[] ob, int off)
{
int olen = 0;
if (ob == null) {
if (_CIPHER.EVP_CipherFinal_ex(this._handle, IntPtr.Zero, ref olen) == 0)
throw new EVPException();
return olen;
}
if (ob != null) {
if (off < 0 || off >= ob.Length)
throw new EVPException();
olen = ob.Length - off;
} else
off = 0;
fixed (byte *obp = ob) {
IntPtr p = new IntPtr(obp + off);
if (_CIPHER.EVP_CipherFinal_ex(this._handle, p, ref olen) == 0)
throw new EVPException();
}
return olen;
}