ASN1_TIME_diff function
- @RecordUse.new()
- @Native<Int Function(Pointer<
Int> , Pointer<Int> , Pointer<ASN1_OCTET_STRING> , Pointer<ASN1_OCTET_STRING> )>(ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>, ffi.Pointer<ASN1_TIME>, ffi.Pointer<ASN1_TIME>)>(symbol: 'bssl_dart_ASN1_TIME_diff')
- Pointer<
Int> out_days, - Pointer<
Int> out_seconds, - Pointer<
ASN1_OCTET_STRING> from, - Pointer<
ASN1_OCTET_STRING> to,
ASN1_TIME_diff computes |to| - |from|. On success, it sets |*out_days| to the difference in days, rounded towards zero, sets |*out_seconds| to the remainder, and returns one. On error, it returns zero.
If |from| is before |to|, both outputs will be <= 0, with at least one negative. If |from| is after |to|, both will be >= 0, with at least one positive. If they are equal, ignoring fractional seconds, both will be zero.
Note this function may fail on overflow, or if |from| or |to| cannot be decoded.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Pointer<ffi.Int>,
ffi.Pointer<ffi.Int>,
ffi.Pointer<ASN1_TIME>,
ffi.Pointer<ASN1_TIME>,
)
>(symbol: 'bssl_dart_ASN1_TIME_diff')
external int ASN1_TIME_diff(
ffi.Pointer<ffi.Int> out_days,
ffi.Pointer<ffi.Int> out_seconds,
ffi.Pointer<ASN1_TIME> from,
ffi.Pointer<ASN1_TIME> to,
);