Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for NewUnauthenticatedCipher (0.59 sec)

  1. src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go

    	ciphertext, tag := out[:len(plaintext)], out[len(plaintext):]
    	if alias.InexactOverlap(out, plaintext) {
    		panic("chacha20poly1305: invalid buffer overlap")
    	}
    
    	var polyKey [32]byte
    	s, _ := chacha20.NewUnauthenticatedCipher(c.key[:], nonce)
    	s.XORKeyStream(polyKey[:], polyKey[:])
    	s.SetCounter(1) // set the counter to 1, skipping 32 bytes
    	s.XORKeyStream(ciphertext, plaintext)
    
    	p := poly1305.New(&polyKey)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 00:11:50 UTC 2022
    - 2.2K bytes
    - Viewed (0)
Back to top