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
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.
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |