{"_id":"@bun-win32/secur32","_rev":"7-6366239ce6850cda8a6d235e9d07815e","name":"@bun-win32/secur32","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/secur32","version":"1.0.0","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"author":{"name":"Stev Peifer","email":"stev@bell.net"},"license":"MIT","_id":"@bun-win32/secur32@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"8e0d182a954ab948d180e81628f993f226647efe","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-1.0.0.tgz","fileCount":5,"integrity":"sha512-TV1A46Wd3dIjtlQk90W31yAPYEcvtl0V0waIy1gRf4N1XMkvdN1z8sNXTVj3dohHbUK3ToEDSJcPpo1zyiRFSw==","signatures":[{"sig":"MEUCIHB1Ti/edXws4KKVRC5cnhtyCS/Qofl5qfKjQqtcalABAiEAiiUnzPAt+9jf2dcUnO0Dc1uacTDZI+/Otf1wZ3aLBz4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49087},"main":"./index.ts","type":"module","module":"index.ts","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"gitHead":"79fd5ea29c17309aa1a154d73424e26283b16c7d","private":false,"scripts":{"example":"bun ./example/secur32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/secur32"},"_npmVersion":"10.1.0","description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"20.8.0","dependencies":{"@bun-win32/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/secur32_1.0.0_1775503147192_0.48949617124751055","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/secur32","version":"1.0.1","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/secur32@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"780bb507ec4b40c26cde74883683aff3fbbbdf3a","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-1.0.1.tgz","fileCount":6,"integrity":"sha512-XfXU467aA2APnx3da59BKR6cDk3jOiN5Sggkeyv220VvBXsNCAfDyU3Kp9oWy699mjCsQBZwJRFurRy/H5h59g==","signatures":[{"sig":"MEUCIQDGtbndmRuMQ9v7isK2RasQmAI3stpP8J50r8xzrPyh6AIgC/sDPIAb8o+f1E4OcdfB8yGWAP2Y9t8thHv6TMVkr9Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51309},"main":"./index.ts","type":"module","module":"index.ts","shasum":"780bb507ec4b40c26cde74883683aff3fbbbdf3a","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/secur32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-XfXU467aA2APnx3da59BKR6cDk3jOiN5Sggkeyv220VvBXsNCAfDyU3Kp9oWy699mjCsQBZwJRFurRy/H5h59g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/secur32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/secur32_1.0.1_1775514764541_0.4068302834486266","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bun-win32/secur32","version":"1.0.2","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"author":{"name":"Stev Peifer","email":"stev@bell.net"},"license":"MIT","_id":"@bun-win32/secur32@1.0.2","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"bd50171dcf246f41fc5adba920778fe69dc5fadb","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-1.0.2.tgz","fileCount":6,"integrity":"sha512-XYSqBZ/ZnBc9UI8h7ILDuF5aelhPQkNxwKBuu4jrnRgDHVimfg1gI7wuLYR/UoZODb33hBijBBc38e2qy7eOSg==","signatures":[{"sig":"MEYCIQCzgD3wSjTSrQzePHesIe0Z8gysbe+fU4rHcvQ4ey4kkAIhAIH0/+ANoJzZx8vQEYMDvWsuUzW0TMoeFQEgIllissh+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51656},"main":"./index.ts","type":"module","module":"index.ts","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"gitHead":"f86f0df557aa6cfee8907bf3af5592855a854c15","private":false,"scripts":{"example":"bun ./example/secur32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/secur32"},"_npmVersion":"10.1.0","description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"20.8.0","dependencies":{"@bun-win32/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/secur32_1.0.2_1775584518504_0.7438444183976809","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bun-win32/secur32","version":"1.0.3","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/secur32@1.0.3","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"4a0c8798ad31cac612eccc966eab1db5b11ef3d5","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-1.0.3.tgz","fileCount":6,"integrity":"sha512-UCoCGA+iZ5JsObgB93E+ezs8mymLzKOSjziSvckDwAF3lRWMH/ieyU63OlQ3tphq66TqcpYEb8V+gxQN23ZbYg==","signatures":[{"sig":"MEYCIQC7he2sbDwZHmtrlynnp84URTykzXD0u3jaqH+qoWtS2AIhAOi2TwzU61kuylX5UbN8CIzKcmGmLgi61T0akGDSX2PO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51708},"main":"./index.ts","type":"module","module":"index.ts","shasum":"4a0c8798ad31cac612eccc966eab1db5b11ef3d5","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/secur32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-UCoCGA+iZ5JsObgB93E+ezs8mymLzKOSjziSvckDwAF3lRWMH/ieyU63OlQ3tphq66TqcpYEb8V+gxQN23ZbYg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/secur32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/secur32_1.0.3_1775616195669_0.17294757902214508","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bun-win32/secur32","version":"1.0.4","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/secur32@1.0.4","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"7db2a64c694567a7bec97dfe9b95ae90f900bbe1","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-1.0.4.tgz","fileCount":6,"integrity":"sha512-Z98359ZGClEYzYoaG8hvT8lXm8c9Z3UTwKYAZKEN2Y/6kdi28UK5xhuJVeOkhB5kiDxSL/PMIhYSFjTeWqCqoQ==","signatures":[{"sig":"MEUCIAoHy8/zu09LO79dtV1IVzecBf1l3g3mw04/kpkbgyl2AiEAhhTzI8OhBq4OxauRWeSFuukNP9vr0WP+jzrZqsr+rnQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51848},"main":"./index.ts","type":"module","module":"index.ts","shasum":"7db2a64c694567a7bec97dfe9b95ae90f900bbe1","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:identity-card":"bun ./example/identity-card.ts","example:security-packages":"bun ./example/security-packages.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-Z98359ZGClEYzYoaG8hvT8lXm8c9Z3UTwKYAZKEN2Y/6kdi28UK5xhuJVeOkhB5kiDxSL/PMIhYSFjTeWqCqoQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/secur32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/secur32_1.0.4_1775687639980_0.5256396853510392","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/secur32","version":"2.0.0","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/secur32@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"6999253432285a367c63602ce7ffd12f6c7bc9c1","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-2.0.0.tgz","fileCount":6,"integrity":"sha512-3Mim6J2HNa9gjGMRtZSvCIhub/K+xB7hf3wQsCvkeDRpRxE2U4Xw1tPkqKgxKZ5//YvJ5SrYe+jAsnUMLx9pJg==","signatures":[{"sig":"MEUCIAm3tvdDSFPEQk1GDJqx5Im4MHWMhE1KzkaUyqOwy73HAiEA19tJmWeWkI86qduyZvsCZfEpW01L/hqK7v856VdOvpU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54556},"main":"./index.ts","type":"module","module":"index.ts","shasum":"6999253432285a367c63602ce7ffd12f6c7bc9c1","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:identity-card":"bun ./example/identity-card.ts","example:security-packages":"bun ./example/security-packages.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-3Mim6J2HNa9gjGMRtZSvCIhub/K+xB7hf3wQsCvkeDRpRxE2U4Xw1tPkqKgxKZ5//YvJ5SrYe+jAsnUMLx9pJg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/secur32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/secur32_2.0.0_1782435502427_0.493339695521013","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/secur32","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/secur32"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:identity-card":"bun ./example/identity-card.ts","example:security-packages":"bun ./example/security-packages.ts"},"_id":"@bun-win32/secur32@2.0.1","_integrity":"sha512-jFjZuDO469RsKUSl1anzkDzOYqfPLJcN4PUOHuf3EjYyzX+70b4ZRAAGW4vrdx86Qtofad6hhO1bbNOzrla/ug==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"e3ec6d71fa641c9307e32863740a45f63f8364db","dist":{"integrity":"sha512-jFjZuDO469RsKUSl1anzkDzOYqfPLJcN4PUOHuf3EjYyzX+70b4ZRAAGW4vrdx86Qtofad6hhO1bbNOzrla/ug==","shasum":"e3ec6d71fa641c9307e32863740a45f63f8364db","tarball":"https://registry.npmjs.org/@bun-win32/secur32/-/secur32-2.0.1.tgz","fileCount":6,"unpackedSize":54556,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCfHGmQqVNJt9MvTG6iNg2dN8uv0GRRFEyz4JAwE0JvKgIgUmXgT+CuMQYr8LBkifRse3qCxBcRZ2iRgRWa+FyaWW0="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/secur32_2.0.1_1782438162814_0.8539168646921482"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-06T19:19:07.113Z","modified":"2026-06-26T01:42:43.087Z","1.0.0":"2026-04-06T19:19:07.331Z","1.0.1":"2026-04-06T22:32:44.759Z","1.0.2":"2026-04-07T17:55:18.661Z","1.0.3":"2026-04-08T02:43:15.816Z","1.0.4":"2026-04-08T22:34:00.162Z","2.0.0":"2026-06-26T00:58:22.580Z","2.0.1":"2026-06-26T01:42:42.959Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","secur32","sspi","security","authentication","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/secur32"},"description":"Zero-dependency, zero-overhead Win32 SECUR32 bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/secur32\r\n\r\nZero-dependency, zero-overhead Win32 Secur32 bindings for [Bun](https://bun.sh) on Windows.\r\n\r\n## Overview\r\n\r\n`@bun-win32/secur32` exposes the `secur32.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Secur32`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\r\n\r\nThe bindings are strongly typed for a smooth DX in TypeScript.\r\n\r\n## Features\r\n\r\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\r\n- Direct FFI to `secur32.dll` (SSPI authentication, credential management, security context negotiation, LSA logon sessions, SASL, and more).\r\n- In-source docs in `structs/Secur32.ts` with links to Microsoft Docs.\r\n- Lazy binding on first call; optional eager preload (`Secur32.Preload()`).\r\n- No wrapper overhead; calls map 1:1 to native APIs.\r\n- Strongly-typed Win32 aliases (see `types/Secur32.ts`).\r\n\r\n## Requirements\r\n\r\n- [Bun](https://bun.sh) runtime\r\n- Windows 10 or later\r\n\r\n## Installation\r\n\r\n```sh\r\nbun add @bun-win32/secur32\r\n```\r\n\r\n## Quick Start\r\n\r\n```ts\r\nimport Secur32 from '@bun-win32/secur32';\r\n\r\n// Optionally bind a subset up-front\r\nSecur32.Preload(['InitSecurityInterfaceW', 'FreeContextBuffer']);\r\n\r\n// Get the SSPI function table\r\nconst table = Secur32.InitSecurityInterfaceW();\r\nconsole.log('SSPI function table:', Boolean(table));\r\n\r\n// Connect to LSA\r\nconst hLsa = Buffer.alloc(8);\r\nconst status = Secur32.LsaConnectUntrusted(hLsa.ptr);\r\nconsole.log('LsaConnectUntrusted:', status);\r\n```\r\n\r\n> [!NOTE]\r\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\r\n\r\n## Examples\r\n\r\nRun the included examples:\r\n\r\n```sh\r\nbun run example              # SSPI function table + LSA connection\r\n```\r\n\r\n## Notes\r\n\r\n- Either rely on lazy binding or call `Secur32.Preload()`.\r\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}