|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.Protect
public final class Protect
Protect marks a file as not-readable, preventing the file from being loaded into an editor.
From Flash 4, a password field was added. In order to load a file in Macromedia's flash editor tool a password must be entered and the MD5 hash must match the value stored in the password field.
IMPORTANT: this form of protection only works with Macromedia's Flash Authoring tool. Any application that parses Flash files can choose to ignore or delete this data structure therefore it is not safe to use this to protect the contents of a Flash file.
Transform will parse all Flash files containing the Protect data structure. Since the encoded data is can be removed by trivial scripts the level of copy-protection offered is minimal. Indeed the use of the Protect mechanism in Flash movies may lead to a false sense of security, putting proprietary information at risk. Sensitive information should not be included in Flash movies.
Constructor Summary | |
---|---|
Protect()
Creates a Protect object with no password - Flash versions 1 to 3 only. |
|
Protect(Protect object)
Creates and initialises a Protect object using the password copied from another Protect object. |
|
Protect(String pass)
Creates a Protect object with the specified password - used for file with Flash version 4 and above. |
|
Protect(SWFDecoder coder)
Creates and initialises a Protect object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
Protect |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
String |
getPassword()
Get the MD5 password hash. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setPassword(String aString)
Sets the MD5 encrypted password. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Protect(SWFDecoder coder) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.
IOException
- if an error occurs while decoding the data.public Protect()
public Protect(String pass)
pass
- the string defining the password. Must not be null.public Protect(Protect object)
object
- a Protect object from which the password will be
copied.Method Detail |
---|
public String getPassword()
public void setPassword(String aString)
aString
- the string defining the password. Must not be null.public Protect copy()
copy
in interface Copyable<MovieTag>
public String toString()
toString
in class Object
public int prepareToEncode(Context context)
prepareToEncode
in interface SWFEncodeable
context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder, Context context) throws IOException
encode
in interface SWFEncodeable
coder
- an SWFEncoder object.context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException
- if an error occurs while encoding the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |