Update comments

This commit is contained in:
Emman 2022-04-26 10:13:17 +08:00
parent eb56eac42a
commit 2dc8dae6bd
2 changed files with 3 additions and 1 deletions

View File

@ -23,6 +23,7 @@ type ZUC128Mac struct {
} }
// NewHash create hash for zuc-128 eia, with arguments key and iv. // NewHash create hash for zuc-128 eia, with arguments key and iv.
// Both key/iv size are 16 in bytes.
func NewHash(key, iv []byte) (*ZUC128Mac, error) { func NewHash(key, iv []byte) (*ZUC128Mac, error) {
k := len(key) k := len(key)
ivLen := len(iv) ivLen := len(iv)

View File

@ -16,7 +16,8 @@ type ZUC256Mac struct {
len uint64 len uint64
} }
// NewHash create hash for zuc-128 eia, with arguments key, iv and tagSize. // NewHash256 create hash for zuc-256 eia, with arguments key, iv and tagSize.
// Key size is 32 in bytes, iv size is 23 in bytes, tagSize supports 4/8/16 in bytes.
// The larger the tag size, the worse the performance. // The larger the tag size, the worse the performance.
func NewHash256(key, iv []byte, tagSize int) (*ZUC256Mac, error) { func NewHash256(key, iv []byte, tagSize int) (*ZUC256Mac, error) {
k := len(key) k := len(key)