Method: Ccs::Encrypter#initialize

Defined in:
lib/ccs/encrypter.rb

#initialize(passphrase, content, salt) ⇒ Encrypter

Constructs an Encrypter instance with given passphrase, content and salt. Salt must be exactly 8 characters long.

Examples:

passphrase = 'my long document passphrase'
content = 'very secret content'
salt = '12345678'

Ccs::Encrypter.new(passphrase, content, salt)

Parameters:

  • passphrase (String)

    Document passphrase.

  • content (String)

    Plaintext content to be encrypted.

  • salt (String)

    Salt to reinforce the encryption, included in plaintext in the encrypted document.



21
22
23
24
25
# File 'lib/ccs/encrypter.rb', line 21

def initialize(passphrase, content, salt)
  @passphrase = passphrase
  @content = content
  @salt = salt
end