package ccm

Import Path
	github.com/hirochachacha/go-smb2/internal/crypto/ccm (on go.dev)

Dependency Relation
	imports 3 packages, and imported by one package

Involved Source Files cbc_mac.go ccm.go util.go
Package-Level Functions (only one)
NewCCMWithNonceAndTagSizes returns the given 128-bit, block cipher wrapped in Counter with CBC-MAC Mode, which accepts nonces of the given length. the formatting of this function is defined in SP800-38C, Appendix A. Each arguments have own valid range: nonceSize should be one of the {7, 8, 9, 10, 11, 12, 13}. tagSize should be one of the {4, 6, 8, 10, 12, 14, 16}. Otherwise, it panics. The maximum payload size is defined as 1<<uint((15-nonceSize)*8)-1. If the given payload size exceeds the limit, it returns a error (Seal returns nil instead). The payload size is defined as len(plaintext) on Seal, len(ciphertext)-tagSize on Open.