Your options are:

  • Try to compile crypt only under win x64 (libc as a whole can't be compiled under windows, but maybe you can compile crypt module)
  • PHP doc you referenced states that PHP has it's own fallback implementation when OS does not provide crypt implementation. Check where does PHP search for crypt implementation on windows - it's probably some C lib and call it too
  • Write the algorithm yourself, here's  a good guide on that
  • Use another more secure hashing algorithm, for example SHA-512

There is also CNA project - it provides an interface for using native C-compatible shared libraries without anything but Caché ObjectScript code. CNA is a wrapper for libffi. CNA consists of native library (libcna) and Caché class (CNA.CNA). It is a wrapper around $zf functions (you can use them directly too).

Here's the code to call crypt using CNA:

Class CNA.Crypt
{

/// do ##class(CNA.Crypt).Crypt()
ClassMethod Crypt(key = "2Ggaobjb", salt = "$1$1a2b3c4d$")
{
    set cna = ##class(CNA.CNA).%New("/InterSystems/forCLM/libcna.so") ; Creates object of CNA.CNA class.
    do cna.LoadLibrary("/lib/x86_64-linux-gnu/libcrypt-2.23.so")      ; Loads C standard library (crypto) in CNA

    set keyPointer = cna.ConvertStringToPointer(key) ; Converts the string into char array, and saves pointer to the first element

    set saltPointer = cna.ConvertStringToPointer(salt)

    set argTypes = $lb(cna.#POINTER, cna.#POINTER)   ; function argument types
    set result = cna.CallFunction("crypt",          ; Passes the name of the function,
                                cna.#POINTER,       ; type of return value,
                                argTypes,         ; list of argument types,
                                keyPointer, saltPointer)           ; and comma-separated arguments */    
    write cna.ConvertPointerToString(result), !      
   
    do cna.FreeLibrary()
}

}

Sample output:

do ##class(CNA.Crypt).Crypt()
>$1$1a2b3c4d$Y5tt50CQ12xW2saeYnI43.

do ##class(CNA.Crypt).Crypt("ABC", "$1$12345678$") 
>$1$12345678$0QgUhxfT5h1pvtkhF5pzx/ 

Assuming  you're on 2016.2+:

set payload = "{""profile_id"":""9XOzzcI8NfSUjxAhEt0cTLRejwmp6HPi"",""biometrics"":[{""timestamp"":""2017-05-17T13:45:40"",""utc_offset"":""+02:00"",""resting_heartrate"":120.0,""spo2"":98.0,""activity_id"":""591c540aac8f295479ee14ce""}]}"
set obj = {}.%FromJSON(payload)
write obj."profile_id"
>9XOzzcI8NfSUjxAhEt0cTLRejwmp6HPi
write obj.biometrics.%Get(0).timestamp
>2017-05-17T13:45:40

 Here's how:

  1. SMP > Ensemble > Production Configuration > Your Business Service > Settings > Additional Settings > Schedule > Press on the the looking glass
  2. In Schedule Spec Editor press "New"
  3. Specify Schedule name and press OK
  4. Set "Raw String" schedule or use "Add action" specify a schedule
  5. Press "Save spec"
  6. Schedule setting in your Business Service should be set now
  7. Restart your Business Service