Package obfuscate implements quantizing and obfuscating of tags and resources for a set of spans matching a certain criteria. This module is used in the Datadog Agent, the Go tracing client (dd-trace-go) and in the OpenTelemetry Collector Datadog exporter./ End-user behavior is stable, but there are no stability guarantees on its public Go API. Nonetheless, if editing try to avoid breaking API changes if possible and double check the API usage on all module dependents.
garble obfuscates Go code by wrapping the Go toolchain.
garble obfuscates Go code by wrapping the Go toolchain.
Package ipcrypt implements IP address encryption and obfuscation methods. It provides three encryption modes: For non-deterministic modes, passing nil as the tweak parameter will automatically generate a random tweak.
Package obfs4 provides an implementation of the Tor Project's obfs4 obfuscation protocol.
Package obfs2 provides an implementation of the Tor Project's obfs2 obfuscation protocol. This protocol is considered trivially broken by most sophisticated adversaries.
Package fn implements the traditional map/filter/reduce/each functions and an array type (A) for those who prefer a more object-oriented approach. Unlike other implementations, the array (slice) is always first preventing the first-class in-line anonymous function from obfuscating the parameter list of the functional function.
Package gqlgen contains an implementation of a gqlgen tracer, and functions to construct and configure the tracer. The tracer can be passed to the gqlgen handler (see package github.com/99designs/gqlgen/handler) Warning: Data obfuscation hasn't been implemented for graphql queries yet, any sensitive data in the query will be sent to Datadog as the resource name of the span. To ensure no sensitive data is included in your spans, always use parameterized graphql queries with sensitive data in variables.
Package obfs2 provides an implementation of the Tor Project's obfs2 obfuscation protocol. This protocol is considered trivially broken by most sophisticated adversaries.
Package obfs4 provides an implementation of the Tor Project's obfs4 obfuscation protocol.
Package obfuscate implements quantizing and obfuscating of tags and resources for a set of spans matching a certain criteria.
Package key provides tools for generating and decoding unique, reversible string identifiers from numeric values using a custom alphabet. This package is particularly useful for creating URL-friendly identifiers, obfuscating sequential IDs, and generating human-readable unique keys. The package is built around the Locksmith type, which handles the conversion between numeric values and string keys. The conversion is bidirectional and deterministic - each numeric value maps to a unique string key, and each valid key maps back to its original numeric value. Common Use Cases: URL Shortening: Generate short, readable URLs from sequential IDs Example: ls, _ := key.New("abcdefghijklmnopqrstuvwxyz", 5) shortURL, _ := ls.Marshal(1234567) ID Obfuscation: Hide sequential database IDs in public-facing identifiers Example: ls, _ := key.New("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 8) publicID, _ := ls.Marshal(userID) // convert DB ID to public identifier dbID, _ := ls.Unmarshal(publicID) // recover original DB ID when needed Ticket/Coupon Generation: Create unique, readable codes Example: ls, _ := key.New("23456789ABCDEFGHJKLMNPQRSTUVWXYZ", 6) ticketCode, _ := ls.Marshal(ticketID) Resource Identifiers: Generate unique identifiers for resources Example: ls, _ := key.New("0123456789abcdef", 0) // dynamic length resourceID, _ := ls.Marshal(timestamp) Key Features: The package ensures that generated keys are unique within the possible range determined by the alphabet length and key size. For fixed-size keys, the maximum possible value is alphabet_length^key_size. For dynamic-size keys, the maximum value is uint64.MaxValue. For optimal performance and security, consider:
Package presents implements a block cipher-based method of converting 64-bit unsigned integers to and from strings. The intended application is towards the obfuscation of sequential database IDs. This example show how to encode and decode IDs. This example shows how to use a custom alphabet as well as shuffling it.