Skip to content

Instantly share code, notes, and snippets.

@azhuox

azhuox/block3.go Secret

Created December 7, 2020 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azhuox/51ecf38205b7cc52d05a2f31d13818cb to your computer and use it in GitHub Desktop.
Save azhuox/51ecf38205b7cc52d05a2f31d13818cb to your computer and use it in GitHub Desktop.
func newCipher(key []byte) (cipher.Block, error) {
if !supportsAES {
return newCipherGeneric(key)
}
n := len(key) + 28
c := aesCipherAsm{aesCipher{make([]uint32, n), make([]uint32, n)}}
...
if supportsAES && supportsGFMUL {
return &aesCipherGCM{c}, nil
}
return &c, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment