diff options
author | xuri <xuri.me@gmail.com> | 2021-08-15 00:06:40 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-08-15 00:06:40 +0800 |
commit | 48c16de8bf74df0fa94a30d29e2e7e3446d48433 (patch) | |
tree | 329a2e4ab896982581bd348a1700d75aeb40a517 /crypt.go | |
parent | f6f14f507ee1adf4883cb1b12f27932a63afb286 (diff) |
Improve security and simplify code
- Make variable name more semantic
- Reduce cyclomatic complexities for the formula calculate function
- Support specified unzip size limit on open file options, avoid zip bombs vulnerability attack
- Typo fix for documentation and error message
Diffstat (limited to 'crypt.go')
-rw-r--r-- | crypt.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -3,9 +3,11 @@ // the LICENSE file. // // Package excelize providing a set of functions that allow you to write to -// and read from XLSX files. Support reads and writes XLSX file generated by -// Microsoft Excelâ„¢ 2007 and later. Support save file without losing original -// charts of XLSX. This library needs Go version 1.15 or later. +// and read from XLSX / XLSM / XLTM files. Supports reading and writing +// spreadsheet documents generated by Microsoft Excelâ„¢ 2007 and later. Supports +// complex components by high compatibility, and provided streaming API for +// generating or reading data from a worksheet with huge amounts of data. This +// library needs Go version 1.15 or later. package excelize @@ -15,6 +17,7 @@ import ( "crypto/cipher" "crypto/hmac" "crypto/md5" + "crypto/rand" "crypto/sha1" "crypto/sha256" "crypto/sha512" @@ -22,7 +25,6 @@ import ( "encoding/binary" "encoding/xml" "hash" - "math/rand" "reflect" "strings" |