WritableCrypt

com.phasmidsoftware.tableparser.crypto.write.WritableCrypt
See theWritableCrypt companion object
trait WritableCrypt[O] extends Writable[O]

Trait to enable rendering of a table to a sequential (non-hierarchical) output format, with each row encrypted. A typeclass.

Type parameters

O

the underlying type, for example, a FileWriter.

Attributes

Companion
object
Graph
Supertypes
trait Writable[O]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def writeLineEncrypted[A : HexEncryption](o: O)(key: String, rawKey: String, plaintext: CharSequence): O

Method to write a row, encrypted, followed by a newline: the key, then "|", then the encrypted row (as Hex). This is the form that EncryptedHeadedStringTableParser reads.

Method to write a row, encrypted, followed by a newline: the key, then "|", then the encrypted row (as Hex). This is the form that EncryptedHeadedStringTableParser reads.

Type parameters

A

the cipher algorithm (for which there must be evidence of HexEncryption[A]).

Value parameters

key

the lookup key for this row (not an encryption key): it is written in plain text.

o

the instance of O whither the row should be written.

plaintext

the plain text character sequence to be written in encrypted form.

rawKey

the encryption key for this row (for AES128CTR, 16 characters).

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited methods

def close(o: O): Unit

Method to close this Writable, if appropriate.

Method to close this Writable, if appropriate.

Attributes

Inherited from:
Writable
def delimiter: CharSequence

The default delimiter is a comma followed by a space.

The default delimiter is a comma followed by a space.

Attributes

Returns

", "

Inherited from:
Writable
def newline: CharSequence

The default newline character is the newline.

The default newline character is the newline.

Attributes

Returns

\n

Inherited from:
Writable
def quote: CharSequence

The default quote is one double-quote symbol

The default quote is one double-quote symbol

Attributes

Returns

"

Inherited from:
Writable
def writeQuoted(o: O)(x: CharSequence): O

Method to write a character sequence to the given instance o, but within quotes. Any quote characters in x will be doubled.

Method to write a character sequence to the given instance o, but within quotes. Any quote characters in x will be doubled.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited from:
Writable
def writeRawLine(o: O)(x: CharSequence): O

Method to write a character sequence to the given instance o followed by a newline.

Method to write a character sequence to the given instance o followed by a newline.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited from:
Writable
def writeRow[Row <: Product](o: O)(x: Row): O

Method to write a value of type Any to the given instance o, possibly quoted.

Method to write a value of type Any to the given instance o, possibly quoted.

Value parameters

o

the instance of O whither the xs values should be written.

x

the row instance to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited from:
Writable
def writeRowElements(o: O)(xs: Seq[Any]): O

Method to write a value of type Any to the given instance o, possibly quoted. Elements will be separated by the delimiter, but no newline is appended. Element strings may be enclosed in quotes if appropriate.

Method to write a value of type Any to the given instance o, possibly quoted. Elements will be separated by the delimiter, but no newline is appended. Element strings may be enclosed in quotes if appropriate.

Value parameters

o

the instance of O whither the xs values should be written.

xs

the sequence of elements (values) to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited from:
Writable
def writeValue(o: O)(x: Any): O

Method to write a value of type Any to the given instance o, possibly quoted.

Method to write a value of type Any to the given instance o, possibly quoted.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited from:
Writable

Inherited and Abstract methods

def unit: O

Method to return an empty (i.e. new) instance of O

Method to return an empty (i.e. new) instance of O

Attributes

Inherited from:
Writable
def writeRaw(o: O)(x: CharSequence): O

Method to write a character sequence to the given instance o.

Method to write a character sequence to the given instance o.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Inherited from:
Writable