Created
January 26, 2014 06:11
-
-
Save ProTip/8629184 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nounce_slice := message[len(message)-8:] | |
var nounce_window uint64 | |
hdrp := (*reflect.SliceHeader)(unsafe.Pointer(&nounce_window)) | |
hdrp.Data = (*reflect.SliceHeader)(unsafe.Pointer(&nounce_slice)).Data | |
hdrp.Len = 1 | |
hdrp.Cap = 1 | |
nounce_window = 10 | |
fmt.Println(nounce_window, nounce_slice) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment