Skip to content

Commit 77226c8

Browse files
Document rationale for hardcoded crypto_box constants
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent d12640d commit 77226c8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/functions/private/Initialize-Sodium.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
throw 'Sodium initialization failed.'
3131
}
3232

33+
# Fixed crypto_box constants (curve25519xsalsa20poly1305). The C# layer queries and validates the real
34+
# native values at type initialization; hardcoding here avoids four extra interop call sites at import.
3335
$script:SodiumPublicKeyBytes = 32u
3436
$script:SodiumPrivateKeyBytes = 32u
3537
$script:SodiumSealBytes = 48u

0 commit comments

Comments
 (0)