mutable strings in go
According to the Go language specification:
Strings are immutable: once created, it is impossible to change the contents of a string.
We’ll see about that.
data := []byte("yellow submarine")
str := *(*string)(unsafe.Pointer(&data))
for i := range data {
data[i] = 'x'
fmt.Printf("%s\n%s\n\n", string(data), str)
}
- 2024-07-23 : : how monzo generates sensitive secrets for its banking platform
- 2022-02-15 : : securely delegating trust with signatures and key management
- 2020-12-16 : : rosen: censorship-resistant proxy tunnel
- 2020-02-20 : : plausibly deniable encryption
- 2019-07-20 : : memory retention attacks
- 2019-07-18 : : encrypting secrets in memory
- 2019-05-02 : : to slice or not to slice
- 2017-08-03 : : memory security in go
- 2017-07-30 : : quantum key-exchange