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

Method Open

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

Source from the content-addressed store, hash-verified

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

Callers 2

decryptMethod · 0.45
OpenMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected