MCPcopy Create free account
hub / github.com/XTLS/REALITY / Open

Method Open

cipher_suites.go:496–506  ·  view source on GitHub ↗
(out, nonce, ciphertext, additionalData []byte)

Source from the content-addressed store, hash-verified

494}
495
496func (f *xorNonceAEAD) Open(out, nonce, ciphertext, additionalData []byte) ([]byte, error) {
497 for i, b := range nonce {
498 f.nonceMask[4+i] ^= b
499 }
500 result, err := f.aead.Open(out, f.nonceMask[:], ciphertext, additionalData)
501 for i, b := range nonce {
502 f.nonceMask[4+i] ^= b
503 }
504
505 return result, err
506}
507
508func aeadAESGCM(key, noncePrefix []byte) aead {
509 if len(noncePrefix) != noncePrefixLength {

Callers 1

OpenMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected