{r}←{force}Init_SHA256 dummy;⎕USING;filename;path;OS
⍝ Make the necessary preparations for hashing a password.\\
⍝ Once initiallized, the function does not run its code again, except when a 1 is passed as `⍺`.
force←{0<⎕NC ⍵:⍎⍵ ⋄ 0}'force'
'⍺ must be a Boolean'Assert(⊂force)∊0 1
:If 9≠⎕NC'SHA256'
:OrIf force
OS←APLTreeUtils2.GetOperatingSystem ⍬
:If 'Win'≡OS
⎕USING←',System.Security.Cryptography.Algorithms',('W'=⊃⊃'.'⎕WG'APLVersion')/'.dll'
SHA256←⎕NEW System.Security.Cryptography.SHA256Managed
:Else
'SHA256'⎕NS''
:If 0=≢path←PathToCongaDLLs
path←(2 ⎕NQ #'GetEnvironment' 'Dyalog'),'/lib/'
:EndIf
filename←⊃FilesAndDirs.ListFiles path,'libconga??ssl',((1+Is64Bit)⊃'32' '64'),(1+'Mac'≡OS)⊃'so' 'dylib'
'Conga DLL not found'Assert 0<≢filename
'Init'SHA256.⎕NA filename,'|nettle_sha256_init >I1[112]'
'Update'SHA256.⎕NA filename,'|nettle_sha256_update =I1[112] U8 <T1[]'
'Digest'SHA256.⎕NA filename,'|nettle_sha256_digest =I1[112] U8 >U1[32]'
SHA256.⎕FX'digest←ComputeHash data;ctx' 'data←⎕UCS⊃data' 'ctx←Init 112' 'ctx←Update ctx(⍴data)data' '(ctx digest)←Digest ctx 32 32'
:EndIf
:EndIf
First I thought that the :Else branch is not on display in the function editor: instead three very small red dots are shown. I have added a screenshot.
But it is more complex than that: the last line before the :Else branch is not shown, but the last line of the :Else branch is!
I am using Ride 4.4 in connection with a 32-bit Dyalog APL on a 64-bit PI 400.
Describe the issue you are having
I pasted this code:
First I thought that the
:Else
branch is not on display in the function editor: instead three very small red dots are shown. I have added a screenshot.But it is more complex than that: the last line before the
:Else
branch is not shown, but the last line of the:Else
branch is!I am using Ride 4.4 in connection with a 32-bit Dyalog APL on a 64-bit PI 400.
This is my
<02102>