class

Nanvault::Plaintext

Inherits Reference / Object

Plaintext data class

Constants

HMAC_ALG = OpenSSL::Algorithm::SHA256
SALT_LEN = 32

salt length

Constructors

new(ptext_str : String)
Source

Instance methods

ctext
Source
ctext=(ctext : Slice(UInt8))
Source
encrypt

encrypt method - also generates safe salt

Source
encrypt_unsafe

internal encrypt method - does NOT generate salt NOTE: YOU SHOULD NOT USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING

Source
encrypted_str

encrypted string method

Source
hmac
Source
hmac=(hmac : Slice(UInt8))
Source
label

these initializations also prevent this: https://github.com/crystal-lang/crystal/issues/5931

Source
label=(label : String)

these initializations also prevent this: https://github.com/crystal-lang/crystal/issues/5931

Source
password=(password : String)
Source
ptext
Source
ptext=(ptext : Slice(UInt8))
Source
salt
Source
salt=(salt : Slice(UInt8))
Source