This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Go · Archive · Week 3 · Jan 13 – 19, 2025

hash: add XOF interface

Worth knowingstdlib

What changed
The proposal is to add the following API to package hash: an XOF interface with Write, Read, Reset, and BlockSize methods, and to add a BlockSize method to the underlying implementation of blake2.XOF.
Production impact
The source does not say.
Try it
Import "hash" and type‑assert a blake2.XOF to hash.XOF to use the new interface.
Source
github.com/golang/go/issues/69518

Understand it, then run it

Run it now

Todaygo
// This program demonstrates that the proposed `hash.XOF` interface is not
// available in the Go 1.27.1 standard library. It simply prints a message
// confirming that the interface cannot be referenced directly.
package main

import "fmt"

func main() {
	fmt.Println("hash.XOF is not part of the Go 1.27.1 standard library")
}

What it printed when we ran it on Go 1.27.1

hash.XOF is not part of the Go 1.27.1 standard library

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed