CN103218548B - A kind of method and apparatus of swf encrypting and protecting files - Google Patents

A kind of method and apparatus of swf encrypting and protecting files Download PDF

Info

Publication number
CN103218548B
CN103218548B CN201310140737.9A CN201310140737A CN103218548B CN 103218548 B CN103218548 B CN 103218548B CN 201310140737 A CN201310140737 A CN 201310140737A CN 103218548 B CN103218548 B CN 103218548B
Authority
CN
China
Prior art keywords
file
swf
swf file
encrypting
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310140737.9A
Other languages
Chinese (zh)
Other versions
CN103218548A (en
Inventor
马华亨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
4399 NETWORK Co Ltd
Original Assignee
4399 NETWORK Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 4399 NETWORK Co Ltd filed Critical 4399 NETWORK Co Ltd
Priority to CN201310140737.9A priority Critical patent/CN103218548B/en
Publication of CN103218548A publication Critical patent/CN103218548A/en
Application granted granted Critical
Publication of CN103218548B publication Critical patent/CN103218548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The present invention relates to video playback field, specifically disclose a kind of method and apparatus of swf encrypting and protecting files, client is submitted request and the cipher mode of encrypting swf file to, is uploaded to encryption processor by file input interface; Encryption processor reads and resolves swf file, and the code section parsing in swf file and material label segment are encrypted respectively, and code section or material label segment after encrypting are transferred to file generator; The code section after encrypting is generated new swf file A by file generator; Code section and material label segment after encrypting are generated to new swf file B; Again new swf file A or new swf file B are transferred to file memory and store, file memory is transferred to client by file output interface again. The present invention is under the normal operation that does not destroy swf file, and code and material to swf file are encrypted, and reaches effective protection swf file, the object that is difficult for being cracked.

Description

A kind of method and apparatus of swf encrypting and protecting files
Technical field
The present invention relates to video playback technical field, especially relate to a kind of material and generation to swf file the insideCode is encrypted the method and apparatus of protection.
Background technology
Swf (shockwaveflash) is the professional format of animation software Flash, is that a kind of support lostThe animation file form of amount and dot pattern, is widely used in the field such as webpage design and cartoon making, swfFile is for creating the application program that comprises video, sound, figure and animation, in Flash, create original inHold or from other Adobe application program (as Photoshop or Illustrator) importing swf file,The simple animation of rapid Design, and use the senior interactive item of AdobeAcitonScript3.0 exploitationOrder. Designer and developer create PowerPoint, application program and other permission with swf file and useThe content that family is mutual.
In order to allow user can better appreciate swf file, operate easily and control swf file, to reachTo better audio visual effect, number of site specialized designs special video broadcasting method and the device in own website,In result of broadcast, definition, speed, special improvement has been carried out in the aspects such as Play Control, some hackers andThe special video broadcasting method in website and device can be stolen or distort to malicious user, affects the glad of normal usersReward is used. Also have number of site to make the exclusive swf file in own website, only allow member to carry out video literary compositionThe preview of part, but some members can, after reading described exclusive swf file, continue on other websiteUpload and play, affected the exclusive broadcasting rights and interests of original website. How effectively to protect swf file, existingHave the cipher mode to SWF file adopting in technology as follows:
The one, adopt the code of SWF file the inside is obscured to encryption, reach the effect of obfuscated codes,But the method can be reduced by certain manner of decryption, thereby can not reach the object of thorough encryption;
The 2nd, whole SWF file is changed into another formatted file to reach cipher round results, althoughCan play to a certain extent the effect of protecting code and material, but this technology changes original SWF fileFile layout, and can be reduced by certain manner of decryption, and can not be reached the file to SWFThe object of thoroughly encrypting. How effectively to protect swf file, also there is no at present effective solution.
Summary of the invention
Technical problem solved by the invention is to provide a kind of method and apparatus of swf encrypting and protecting files,Do not destroy under the normal operation of swf file, code and material to swf file are encrypted, and reach effective guarantorProtect swf file, the object that is difficult for being cracked.
In order to solve the problems of the technologies described above, the invention provides a kind of method of swf encrypting and protecting files:
S1: client is submitted the request of encrypting swf file to, described client is submitted described swf file to simultaneouslyCipher mode;
S2: described swf file and described cipher mode are uploaded to encryption processor by file input interface;
S3.1: described encryption processor reads described swf file;
S3.2: described encryption processor is resolved the file header of described swf file; Described encryption processor is according to solutionThe described file header of the described swf file of analysing judges, judges whether described swf file is the swf literary composition of compressionPart, process respectively:
S3.2.a: in the time judging the swf file that described swf file is described compression, described encryption processor solutionPress the swf file of described compression, the described swf file after decompress(ion) is carried out to following step S3.3;
S3.2.b: in the time judging the swf file that described swf file is not described compression, directly carry out following stepRapid S3.3;
S3.3: described encryption processor is resolved other parts except described file header in described swf file, described inEncryption processor parses the code section in described swf file and material label segment;
S3.4: described encryption processor is respectively to the described code section in described swf file and described material markSigning part is encrypted respectively:
S3.4.a: described encryption processor is encrypted described code section by non-reversible algorithm,The described code section after encrypting is transferred to file generator by described encryption processor;
S3.4.b: described material label segment is compressed hiding encryption place of transcoding by described encryption processorReason, the described material label segment after encrypting is transferred to described file generator by described encryption processor;
S4.a: described file generator receives the described code section after encrypting, described file generator will againDescribed code section after encryption generates new swf file A; Described file generator passes described new swf file ABe defeated by file memory;
S4.b: described file generator receives described code section and the described material label segment after encrypting,Described file generator generates new swf literary composition by described code section and described material label segment after encrypting againPart B; Described new swf file B is transferred to file memory by described file generator;
S5: described file memory receives described new swf file A or described new swf file B and stores,Described new swf file A or described new swf file B are transferred to file output interface by described file memory;
S6: described file output interface receives described new swf file A or described new swf file B and is transferred to instituteState client.
Preferably, described cipher mode is cipher mode A or cipher mode B.
More preferably, described cipher mode A is general encryption, only code is obscured to encryption, reaches mixedThe confuse effect of code; Described cipher mode A carries out in S1~S6 step except described S3.4.b step and described S4.bOther steps beyond step.
More preferably, described cipher mode B encrypts for strengthening, code and material label is carried out strictly simultaneouslyEncrypt, reach the object that is difficult for being cracked; Described cipher mode B carries out in S1~S6 step except described S4.a stepOther steps beyond rapid.
Meanwhile, the present invention also provide a kind of swf encrypting and protecting files device, comprising: client, literary compositionPart input interface, encryption processor, file generator, file memory and file output interface; Described visitorFamily end is connected with described file output interface with described file input interface respectively, described file input interface,Described encryption processor, described file generator, described file memory and described file output interface are successivelyConnect.
Preferably, described file input interface be VGA input interface, DVI input interface, RCA input interface orOne or more in S-Video input interface.
Preferably, described file output interface is that VGA output interface, DVI output interface, S-Video output connectOne or more in mouth or compound output interface.
The present invention compared with prior art, has following beneficial effect:
The invention provides a kind of method and apparatus of swf encrypting and protecting files, just do not destroying swf fileUnder normal operation, code and material to swf file are encrypted, and reach effective protection swf file, are difficult for quiltThe object cracking. The present invention is easy and simple to handle understandable, has improved treatment effeciency, has reduced intractability; CompleteGround has retained the operation of former SWF file, without destructive; And can be published on client, convenient encryption.
Brief description of the drawings
Fig. 1 shows the method flow schematic diagram A of swf encrypting and protecting files;
Fig. 2 shows the method flow schematic diagram B of swf encrypting and protecting files;
Fig. 3 shows the apparatus structure schematic diagram of swf encrypting and protecting files.
Detailed description of the invention
For the technical scheme of understanding better technical problem solved by the invention, providing, below in conjunction withDrawings and Examples, are further elaborated to the present invention. Specific embodiment described herein is only usedTo explain enforcement of the present invention, but be not intended to limit the present invention.
Preferred embodiment 1:
As shown in Figure 1, the method flow diagram A of swf encrypting and protecting files: client submission encryption swf fileRequest, described client is submitted the cipher mode A of described swf file to simultaneously; Described swf file and described encryptionMode A is uploaded to encryption processor by file input interface; Described encryption processor reads described swf file;Described encryption processor is resolved the file header of described swf file; Described encryption processor is according to described in parsingThe described file header of swf file judges judge whether described swf file is the swf file of compression, respectivelyProcess:
In the time judging the swf file that described swf file is described compression, press described in described encryption processor decompress(ion)The swf file of contracting, carries out following step by the described swf file after decompress(ion);
In the time judging the swf file that described swf file is not described compression, directly carry out following step;
Described encryption processor is resolved other parts except described file header in described swf file, described encryption placeReason device parses the code section in described swf file and material label segment; Described encryption processor dividesOther described code section in described swf file is encrypted: described encryption processor is by described code sectionBe encrypted by non-reversible algorithm, described encryption processor is by the described code section transmission after encryptingGive file generator; Described file generator receives the described code section after encrypting, described file generatorAgain the described code section after encrypting is generated to new swf file A; Described file generator is by described new swf fileA is transferred to file memory; Described file memory receives described new swf file A and stores described literary compositionDescribed new swf file A is transferred to file output interface by part memory; Described in described file output interface receivesNew swf file A is also transferred to described client.
Preferred embodiment 2:
As shown in Figure 2, the method flow diagram B of swf encrypting and protecting files: client submission encryption swf fileRequest, described client is submitted the cipher mode B of described swf file to simultaneously; Described swf file and described encryptionMode B is uploaded to encryption processor by file input interface; Described encryption processor reads described swf file;Described encryption processor is resolved the file header of described swf file; Described encryption processor is according to described in parsingThe described file header of swf file judges judge whether described swf file is the swf file of compression, respectivelyProcess:
In the time judging the swf file that described swf file is described compression, press described in described encryption processor decompress(ion)The swf file of contracting, carries out following step by the described swf file after decompress(ion);
In the time judging the swf file that described swf file is not described compression, directly carry out following step;
Described encryption processor is resolved other parts except described file header in described swf file, described encryption placeReason device parses the code section in described swf file and material label segment; Described encryption processor dividesOther described code section in described swf file and described material label segment are encrypted respectively: described in addClose processor is encrypted described code section by non-reversible algorithm, described encryption processor will addDescribed code section after close is transferred to file generator; Described encryption processor is by described material label segmentCompress the hiding encryption of transcoding, described encryption processor is by the described material label segment after encryptingBe transferred to described file generator; Described file generator receives described code section and the described element after encryptingMaterial label segment, described file generator is again by described code section and described material label segment after encryptingGenerate new swf file B; Described new swf file B is transferred to file memory by described file generator; DescribedFile memory receives described new swf file B and stores, and described file memory is by described new swf fileB is transferred to file output interface; Described file output interface receives described new swf file B and is transferred to described visitorFamily end.
In a preferred embodiment, Fig. 3 exemplarily shows the apparatus structure signal of swf encrypting and protecting filesFigure, comprising: client 1, file input interface 2, encryption processor 3, file generator 4, file storageDevice 5 and file output interface 6; Described client 1 respectively with described file input interface 2 and described file outputInterface 6 is connected, described file input interface 2, described encryption processor 3, described file generator 4, described inFile memory 5 is connected successively with described file output interface 6.
In the embodiment being more preferably, described file input interface 2 be VGA input interface, DVI input interface,One or more in RCA input interface or S-Video input interface.
In the embodiment being more preferably, described file output interface 6 be VGA output interface, DVI output interface,One or more in S-Video output interface or compound output interface.
Wherein, described client 1 is that mobile phone, personal computer, panel computer or other and website are obtained logicalBelieve and dispose play the hardware (for example: processor) of swf file and software (for example: FLASH software,Windows operating system etc.) device.
Specific embodiment is:
User opens device of the present invention and adds the swf file that needs encryption, then chooses the mode that needs encryption,Select cipher mode A or cipher mode B, click and encrypt button, wait completing of progress bar to be encrypted, work as encryptionAfter progress bar shows 100%, encryption completes, and automatic spring saves as dialog box, by the new swf after encryptingFile is preserved.
More than by the detailed description of concrete and preferred embodiment the present invention, but those skilled in the artShould be understood that the present invention is not limited to the above embodiment, all within general principle of the present invention,Any amendment of doing, combine and be equal to replacement etc., within being all included in protection scope of the present invention.

Claims (2)

1. a method for swf encrypting and protecting files, is characterized in that, comprising:
S1: client is submitted the request of encrypting swf file to, and described client is submitted described swf file to simultaneouslyCipher mode;
S2: described swf file and described cipher mode are uploaded to encryption processor by file input interface;
S3.1: described encryption processor reads described swf file;
S3.2: described encryption processor is resolved the file header of described swf file; Described encryption processor basisThe described file header of the described swf file of resolving judges, judges whether described swf file compressesSwf file, process respectively:
S3.2.a: in the time judging the swf file that described swf file is described compression, described encryption processorThe swf file compressing described in decompress(ion), carries out following step S3.3 by the described swf file after decompress(ion);
S3.2.b: in the time judging the swf file that described swf file is not described compression, directly carry out followingStep S3.3;
S3.3: described encryption processor is resolved other parts except described file header in described swf file, instituteStating encryption processor parses the code section in described swf file and material label segment;
S3.4: described encryption processor is respectively to the described code section in described swf file and described materialLabel segment is encrypted respectively:
S3.4.a: described encryption processor is encrypted described code section by non-reversible algorithm,The described code section after encrypting is transferred to file generator by described encryption processor;
S3.4.b: described material label segment is compressed hiding encryption place of transcoding by described encryption processorReason, the described material label segment after encrypting is transferred to described file generator by described encryption processor;
S4.a: described file generator receives the described code section after encrypting, described file generator will againDescribed code section after encryption generates new swf file A; Described file generator is by described new swf file ABe transferred to file memory;
S4.b: described file generator receives described code section and the described material label segment after encrypting,Described file generator generates new swf literary composition by described code section and described material label segment after encrypting againPart B; Described new swf file B is transferred to file memory by described file generator;
S5: described file memory receives described new swf file A or described new swf file B and depositsStorage, described new swf file A or described new swf file B are transferred to file output by described file memoryInterface;
S6: described file output interface receives described new swf file A or described new swf file B transmissionGive described client;
Described cipher mode is cipher mode A or cipher mode B;
Described cipher mode A is general encryption, and code is obscured to encryption; Described cipher mode A carries outOther steps in S1~S6 step except described S3.4.b step and described S4.b step;
Described cipher mode B encrypts for strengthening, code and material label is strictly encrypted simultaneously; DescribedCipher mode B carries out other steps except described S4.a step in S1~S6 step.
2. the device based on swf method of encrypting and protecting files described in claim 1, is characterized in that,Comprise: client, file input interface, encryption processor, file generator, file memory and fileOutput interface; Described client is connected with described file output interface with described file input interface respectively, instituteState file input interface, described encryption processor, described file generator, described file memory and described inFile output interface connects successively;
Described file input interface is VGA input interface, DVI input interface, RCA input interface or S-VideoOne or more in input interface;
Described file output interface is VGA output interface, DVI output interface, S-Video output interface or multipleClose one or more in output interface.
CN201310140737.9A 2013-04-22 2013-04-22 A kind of method and apparatus of swf encrypting and protecting files Active CN103218548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310140737.9A CN103218548B (en) 2013-04-22 2013-04-22 A kind of method and apparatus of swf encrypting and protecting files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310140737.9A CN103218548B (en) 2013-04-22 2013-04-22 A kind of method and apparatus of swf encrypting and protecting files

Publications (2)

Publication Number Publication Date
CN103218548A CN103218548A (en) 2013-07-24
CN103218548B true CN103218548B (en) 2016-05-11

Family

ID=48816325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310140737.9A Active CN103218548B (en) 2013-04-22 2013-04-22 A kind of method and apparatus of swf encrypting and protecting files

Country Status (1)

Country Link
CN (1) CN103218548B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228082B (en) * 2016-07-18 2019-01-29 武汉斗鱼网络科技有限公司 The guard method and system of SWF file
CN106203173B (en) * 2016-07-25 2019-04-05 武汉斗鱼网络科技有限公司 A kind of SWF file cracks means of defence and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2650231Y (en) * 2003-09-26 2004-10-20 北京华旗资讯数码科技有限公司 Storage unit with optimized compression management mechanism
CN102156842A (en) * 2010-02-11 2011-08-17 腾讯科技(深圳)有限公司 File encryption protection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120101623A1 (en) * 2010-10-22 2012-04-26 Best Wise International Computing Co., Ltd. Encryption Method of Digital Data, Decryption Method of Encrypted Digital Data, Manufacturing System of Storage Apparatus and Manufacturing Method Thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2650231Y (en) * 2003-09-26 2004-10-20 北京华旗资讯数码科技有限公司 Storage unit with optimized compression management mechanism
CN102156842A (en) * 2010-02-11 2011-08-17 腾讯科技(深圳)有限公司 File encryption protection method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SWF矢量动画解析框架设计;倪应华等;《计算机系统应用》;20100315;第19卷(第3期);参见第202-205页 *
一种swf文件版权保护简单实现方案;王继州等;《数字技术与应用》;20120815;参见第169-171页 *
一种基于标签排序的swf文件版权保护方法;李欣等;《第八届全国信息隐藏与多媒体安全学术大会湖南省计算机学会第十一届学术年会论文集》;20080328;参见第31-36页 *
对SWF文件实现加密保护;王明瑞等;《福建电脑》;20120325(第3期);参见第140、158页 *

Also Published As

Publication number Publication date
CN103218548A (en) 2013-07-24

Similar Documents

Publication Publication Date Title
CN103620611B (en) The method and apparatus that the dynamic realtime advertisement based on metadata in hardware based root of trust is inserted
US9014374B2 (en) Protecting video as it is decoded by a codec
JP5331920B2 (en) Computer-readable storage medium
US10455286B2 (en) Protected media decoding system supporting metadata
KR101881303B1 (en) Apparatas and method of protecting for application data in a portable terminal
CN101282468B (en) Systems and methods for accessing encrypted content
CN103414733B (en) The player method of HLS Streaming Media and system
CN105453094A (en) Protected media decoding using a secure operating system
US20170353745A1 (en) Secure media player
CN107005402A (en) Access to content is provided
KR20130093557A (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
CN103136459A (en) Copyright identification method and system for encrypted digital contents
CN106375080B (en) Flash file encryption and decryption method and device
KR102001046B1 (en) Apparatus and Method of Providing Security, and Apparatus and Method of Executing Security for Common Intermediate Language
Müller et al. Practical decryption exfiltration: Breaking pdf encryption
WO2016206457A1 (en) Method and apparatus for processing multimedia file
CN103218548B (en) A kind of method and apparatus of swf encrypting and protecting files
EP3097655B1 (en) Method of protecting secret data when used in a cryptographic algorithm
CN103605927B (en) Encryption and decryption method and device based on embedded Linux system
KR101267875B1 (en) Apparatus for message encryption and decryption using virtual keyboard and recording medium storing program for executing method of the same in computer
JP5601382B2 (en) Information processing apparatus, information processing method, and information processing program in embedded device
KR20150018657A (en) Method and apparatus for protecting of data
WO2020103060A1 (en) Data processing method and apparatus, system, server, and electronic device
TW201640392A (en) Computerized system and method for implementing digital rights management
JP6537729B1 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, PROGRAM, AND RECORDING MEDIUM

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant