Fortran binds through ISO_C_BINDING, which is standard Fortran 2003 and needs nothing vendor-specific: the same module works with gfortran, Intel and NAG.
use keynub
type(keynub_dongle) :: dongle
integer :: rc
rc = keynub_open(dongle, "") ! first dongle found
if (rc /= 0) stop "no KeyNub found"
if (.not. keynub_is_genuine(dongle)) stop "not a genuine KeyNub"
rc = keynub_session_open(dongle)
call keynub_close(dongle)Code language: Fortran (fortran)
Why Fortran codes are worth protecting
A Fortran solver is often the most valuable software an engineering company owns, and the least replaceable: decades of validation, published results depending on it, and physical correctness nobody wants to re-derive. It is also frequently licensed per seat or per cluster to organisations large enough that an honest licence count matters commercially.
The pattern that fits best here is the one Fortran already suggests: encrypt the material property tables, empirical coefficients or validated constants your solver reads at start-up. Those are the part a competitor cannot regenerate, they are already data rather than code, and without the dongle the solver has no physics to solve.