ATProto Browser

ATProto Browser

Experimental browser for the Atmosphere

Post

Here's a weird proposal: testing.RandReader. Returns a deterministic PRNG based on a weak seed, only works in tests, and can be magically used with GenerateKey and Sign to make them predictable (so they can be part of larger test vectors). WDYT? #golang

Mar 16, 2025, 7:55 PM

Record data

{
  "uri": "at://did:plc:x2nsupeeo52oznrmplwapppl/app.bsky.feed.post/3lkjga7o2cp2k",
  "cid": "bafyreiateldbfkhv4t6avz476fgbq4tlpj2srioqne6jraqi7ls6qtnigm",
  "value": {
    "text": "Here's a weird proposal: testing.RandReader.\n\nReturns a deterministic PRNG based on a weak seed, only works in tests, and can be magically used with GenerateKey and Sign to make them predictable (so they can be part of larger test vectors).\n\nWDYT? #golang",
    "$type": "app.bsky.feed.post",
    "embed": {
      "$type": "app.bsky.embed.external",
      "external": {
        "uri": "https://github.com/golang/go/issues/70942#issuecomment-2727617433",
        "$type": "app.bsky.embed.external#external",
        "thumb": {
          "$type": "blob",
          "ref": {
            "$link": "bafkreigbjdggtjv3m5vzidm76pc3dksgoxzpdvh4ls3hw5duf2uwudko6u"
          },
          "mimeType": "image/png",
          "size": 84307
        },
        "title": "proposal: crypto: ignore rand io.Reader where behavior is not specified · Issue #70942 · golang/go",
        "description": "There are a few crypto APIs that take an io.Reader as a source of random bytes, but that don't commit to how those bytes are used. This caused issues over and over, for example any time we wanted t..."
      }
    },
    "langs": [
      "en"
    ],
    "facets": [
      {
        "index": {
          "byteEnd": 255,
          "byteStart": 248
        },
        "features": [
          {
            "tag": "golang",
            "$type": "app.bsky.richtext.facet#tag"
          }
        ]
      }
    ],
    "createdAt": "2025-03-16T19:55:05.835Z"
  }
}