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

Method Seal

cipher_suites.go:480–490  ·  view source on GitHub ↗
(out, nonce, plaintext, additionalData []byte)

Source from the content-addressed store, hash-verified

478func (f *xorNonceAEAD) explicitNonceLen() int { return 0 }
479
480func (f *xorNonceAEAD) Seal(out, nonce, plaintext, additionalData []byte) []byte {
481 for i, b := range nonce {
482 f.nonceMask[4+i] ^= b
483 }
484 result := f.aead.Seal(out, f.nonceMask[:], plaintext, additionalData)
485 for i, b := range nonce {
486 f.nonceMask[4+i] ^= b
487 }
488
489 return result
490}
491
492func (f *xorNonceAEAD) Open(out, nonce, ciphertext, additionalData []byte) ([]byte, error) {
493 for i, b := range nonce {

Callers 2

encryptMethod · 0.45
SealMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected