TableCrypt

com.phasmidsoftware.tableparser.crypto.table.TableCrypt
object TableCrypt

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TableCrypt.type

Members list

Value members

Concrete methods

def writeCSVFileEncrypted[A, Row](table: Table[Row])(path: Path, keyFunction: String => String)(using evidence$1: HexEncryption[A], renderer: CsvRenderer[Row], generator: CsvGenerator[Row], hasKey: HasKey[Row], csvAttributes: CsvAttributes): Try[Unit]

Method to write a Table[Row] as a CSV file, with the header in plain text and each row encrypted: this is writeCSVFileEncryptedIO, run synchronously.

Method to write a Table[Row] as a CSV file, with the header in plain text and each row encrypted: this is writeCSVFileEncryptedIO, run synchronously.

Type parameters

A

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

Value parameters

keyFunction

a function which takes the key of a row (see HasKey) and returns the encryption key for that row.

path

the Path where the output should be stored.

table

the table.

Attributes

Returns

Success(()) if the table was written, otherwise a Failure (up to 2.0.1, failures were ignored).

def writeCSVFileEncryptedIO[A, Row](table: Table[Row])(path: Path, keyFunction: String => String)(using evidence$1: HexEncryption[A], renderer: CsvRenderer[Row], generator: CsvGenerator[Row], hasKey: HasKey[Row], csvAttributes: CsvAttributes): IO[Unit]

Method to write a Table[Row] as a CSV file, with the header in plain text and each row encrypted (as EncryptedHeadedStringTableParser reads it): each row is its key, "|", and the encrypted row (as Hex). The rows are encrypted (in parallel) and the file written when the IO is run; the file is closed whether or not the IO succeeds.

Method to write a Table[Row] as a CSV file, with the header in plain text and each row encrypted (as EncryptedHeadedStringTableParser reads it): each row is its key, "|", and the encrypted row (as Hex). The rows are encrypted (in parallel) and the file written when the IO is run; the file is closed whether or not the IO succeeds.

Type parameters

A

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

Value parameters

csvAttributes

implicit value of CsvAttributes (its newline ends each line).

generator

implicit value of CsvGenerator[Row] (for the header).

hasKey

implicit value of HasKey[Row]. This relates to a column which is the "key" column in a CSV (used for identification). It is not directly related to cryptography.

keyFunction

a function which takes the key of a row (see HasKey) and returns the encryption key for that row (for AES128CTR, 16 characters).

path

the Path where the output should be stored.

renderer

implicit value of CsvRenderer[Row].

table

the table.

Attributes

Returns

an IO[Unit].