Package com.mku.salmon.sequence
Class SalmonSequenceSerializer
java.lang.Object
com.mku.salmon.sequence.SalmonSequenceSerializer
- All Implemented Interfaces:
INonceSequenceSerializer
Serializes sequences for all the drives the device is authorized.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String contents) Deserialize sequences from XML string.serialize
(HashMap<String, NonceSequence> driveAuthEntries) Serialize the sequences to an XML string.
-
Constructor Details
-
SalmonSequenceSerializer
public SalmonSequenceSerializer()
-
-
Method Details
-
serialize
Serialize the sequences to an XML string.- Specified by:
serialize
in interfaceINonceSequenceSerializer
- Parameters:
driveAuthEntries
- The sequences to convert to text.- Returns:
- The serialized contents
- Throws:
SequenceException
- Thrown if there is an error with the nonce sequence
-
deserialize
Deserialize sequences from XML string.- Specified by:
deserialize
in interfaceINonceSequenceSerializer
- Parameters:
contents
- The contents containing the nonce sequences.- Returns:
- The deserialized sequences
- Throws:
SequenceException
- Thrown if there is an error with the nonce sequence
-