From this moment on, I have been sealed off! No pick-up!
Men like the wind, like the wind of character, unrestrained, eclectic. Then the question comes, when the wind meets the sand, not necessarily you are the wind , I am the sand son 's entangled ,. Perhaps is the sky yellow sand, the fly grain stone. If we want to seize the dust of the sky, we must have a strong arm! So the nets, nets, net! Let him be honest and close up, forever snuggle , Allah!
Read at the front:
1,Excel encryption implementation, This article is described in Microsoft Office 2007 as a case.
2. Microsoft Office Zero Office is based on the Open XML file (also known as OOXML or OpenXML or MOX, which is an XML -based and compressed in zip format Electronic document specification, supporting file formats such as documents, forms, memos, slides , etc.
3, this article can achieve C-side Excel encryption, S-side Excel encryption (no need to install any server components, to say goodbye to all the trouble ).
4. The encryption method of this paper can be used to encrypt. docx,. xlsx,. pptx, and other file types.
Well, let's get pickled cabbage!
1. Download our dependent components
Cryptographic components Download
2, Encryption! Start! over!
The project introduces Npoi.poifs.dll,npoi.util.dll,officeopenxmlcrypto.dll, the detail implementation code is as follows:
using (Officecryptostream stream = Officecryptostream.open (@ "location")) { " password"; Stream. Save ();}
Note:
1. Code Description: Location: Encrypted file path, password: encrypted password
2, encryption principle: Based on AES128, encryption key generation mode: SHA1, specific encryption details see Ms-offcrypto
3, other encryption technology stack: Epplus class Library,openxml 2.0 SDK See explosion network similar encryption QA
4. If you are deploying on IIS, you need to enable 32-bit mode for the Web site corresponding application pool.
5, reference links (all walls, self-owned VPN):
(1), http://www.lyquidity.com/devblog/?p=35
(2), https://msdn.microsoft.com/en-us/library/cc313071.aspx
(3), Https://en.wikipedia.org/wiki/Office_Open_XML
(4), https://code.google.com/archive/p/ooxmlcrypto/
By: Dolphin Bay-Fung
Excel encryption Implementation (c#\.net\asp. Net)