
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/shabbyrobe/go-num
[!WARNING] This repo has moved to sourcehut (https://git.sr.ht/~shabbyrobe/go-num), and has also been placed into maintenance mode. This version will remain here for the time being but may be removed at a later date. You may also consider https://pkg.go.dev/lukechampine.com/uint128 for your use case as I am unlikely to spend much time on this in future unless a serious bug is found.
Fastish int128
(num.I128
) and uint128
(num.U128
) 128-bit integer types
for Go, providing the majority of methods found in big.Int
.
WARNING: Function execution times in this library almost always depend on the inputs. This library is inappropriate for use in any domain where it is important that the execution time does not reveal details about the inputs used.
I128
is a signed "two's complement" implementation that should behave the
same way on overflow as int64
.
U128
and I128
are immutable value types by default; operations always return a
new value rather than mutating the existing one.
Simple usage:
a := num.U128From64(1234)
b := num.U128From64(5678)
b := a.Add(a)
fmt.Printf("%x", x)
Most operations that operate on 2 128-bit numbers have a variant that accepts a 64-bit number:
a := num.U128From64(1234)
b := a.Add64(5678)
fmt.Printf("%x", x)
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.