Skip to content

Commit

Permalink
Merge pull request #11 from status-im/feat/issue-5096
Browse files Browse the repository at this point in the history
feat: Added new function to call to new status-go `GetPasswordStrengthScore` function
  • Loading branch information
noeliaSD authored Mar 23, 2022
2 parents ed2b3f6 + 763ef83 commit a46e189
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions status_go.nim
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,9 @@ proc imageServerTLSCert*(): string =
proc getPasswordStrength*(paramsJSON: string): string =
var funcOut = go_shim.getPasswordStrength(paramsJSON.cstring)
defer: go_shim.free(funcOut)
return $funcOut

proc getPasswordStrengthScore*(paramsJSON: string): string =
var funcOut = go_shim.getPasswordStrengthScore(paramsJSON.cstring)
defer: go_shim.free(funcOut)
return $funcOut
4 changes: 3 additions & 1 deletion status_go/impl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,6 @@ proc free*(param: pointer) {.importc: "Free".}

proc imageServerTLSCert*(): cstring {.importc: "ImageServerTLSCert".}

proc getPasswordStrength*(paramsJSON: cstring): cstring {.importc: "GetPasswordStrength".}
proc getPasswordStrength*(paramsJSON: cstring): cstring {.importc: "GetPasswordStrength".}

proc getPasswordStrengthScore*(paramsJSON: cstring): cstring {.importc: "GetPasswordStrengthScore".}

0 comments on commit a46e189

Please sign in to comment.