github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/crypto/ccm.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package crypto 4 5 // CCM cipher mode 6 type ccm struct { 7 b BlockCipher128 8 } 9 10 // NewCCM use to create the ccm that implement Cipher interface! 11 func NewCCM(b BlockCipher128) Cipher { 12 var c = ccm{ 13 b: b, 14 } 15 return &c 16 } 17 18 // Encrypt encrypts the buf. 19 // If original buf needed for any other proccess, must clone it before pass it!! 20 func (c *ccm) Encrypt(buf []byte) (err error) { 21 return 22 } 23 24 // Decrypt decrypts the buf. 25 // If original buf needed for any other proccess, must clone it before pass it!! 26 func (c *ccm) Decrypt(buf []byte) (err error) { 27 return 28 }