From 0a827de266931d9aa7be422d20d07abbffd60b2e Mon Sep 17 00:00:00 2001 From: Emman Date: Wed, 20 Apr 2022 08:36:44 +0800 Subject: [PATCH] update package level comments --- padding/ansi_x923.go | 2 +- padding/pkcs7.go | 3 ++- rc5/cipher.go | 1 + sm2/sm2.go | 1 + sm3/sm3.go | 1 + sm4/cipher.go | 1 + zuc/core.go | 1 + 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/padding/ansi_x923.go b/padding/ansi_x923.go index d1f8a6e..76f23ed 100644 --- a/padding/ansi_x923.go +++ b/padding/ansi_x923.go @@ -1,4 +1,3 @@ -// https://www.ibm.com/docs/en/linux-on-systems?topic=processes-ansi-x923-cipher-block-chaining package padding import ( @@ -7,6 +6,7 @@ import ( "github.com/emmansun/gmsm/internal/subtle" ) +// https://www.ibm.com/docs/en/linux-on-systems?topic=processes-ansi-x923-cipher-block-chaining type ansiX923Padding uint func (pad ansiX923Padding) BlockSize() int { diff --git a/padding/pkcs7.go b/padding/pkcs7.go index 7702291..a9f84f0 100644 --- a/padding/pkcs7.go +++ b/padding/pkcs7.go @@ -1,4 +1,4 @@ -// https://datatracker.ietf.org/doc/html/rfc5652#section-6.3 +// Package padding handle padding octets at the trailing end package padding import ( @@ -7,6 +7,7 @@ import ( "github.com/emmansun/gmsm/internal/subtle" ) +// https://datatracker.ietf.org/doc/html/rfc5652#section-6.3 type pkcs7Padding uint func (pad pkcs7Padding) BlockSize() int { diff --git a/rc5/cipher.go b/rc5/cipher.go index 10f7153..f03876e 100644 --- a/rc5/cipher.go +++ b/rc5/cipher.go @@ -1,3 +1,4 @@ +// Package rc5 handle rc5 symmetric encryption algorithm package rc5 import ( diff --git a/sm2/sm2.go b/sm2/sm2.go index 3b01f3c..d380e39 100644 --- a/sm2/sm2.go +++ b/sm2/sm2.go @@ -1,3 +1,4 @@ +// Package sm2 handle shangmi sm2 algorithm and its curve implementation package sm2 // Further references: diff --git a/sm3/sm3.go b/sm3/sm3.go index 4cd22b5..42b4493 100644 --- a/sm3/sm3.go +++ b/sm3/sm3.go @@ -1,3 +1,4 @@ +// Package sm3 handle shangmi sm3 hash algorithm package sm3 // [GM/T] SM3 GB/T 32905-2016 diff --git a/sm4/cipher.go b/sm4/cipher.go index 8676db3..be575df 100644 --- a/sm4/cipher.go +++ b/sm4/cipher.go @@ -1,3 +1,4 @@ +// Package sm4 handle shangmi sm4 symmetric encryption algorithm package sm4 import ( diff --git a/zuc/core.go b/zuc/core.go index 68f810c..95d1fb9 100644 --- a/zuc/core.go +++ b/zuc/core.go @@ -1,3 +1,4 @@ +// Package zuc handle shangmi zuc stream cipher package zuc import (