class Nanvault::Plaintext

Overview

Plaintext data class

Defined in:

nanvault.cr

Constant Summary

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

salt length

Constructors

Instance Method Summary

Constructor Detail

def self.new(ptext_str : String) #

[View source]

Instance Method Detail

def ctext : Slice(UInt8) #

[View source]
def ctext=(ctext : Slice(UInt8)) #

[View source]
def encrypt #

encrypt method - also generates safe salt


[View source]
def encrypt_unsafe #

internal encrypt method - does NOT generate salt

NOTE YOU SHOULD NOT USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING


[View source]
def encrypted_str #

encrypted string method


[View source]
def hmac : Slice(UInt8) #

[View source]
def hmac=(hmac : Slice(UInt8)) #

[View source]
def label : String #

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


[View source]
def label=(label : String) #

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


[View source]
def password=(password : String) #

[View source]
def ptext : Slice(UInt8) #

[View source]
def ptext=(ptext : Slice(UInt8)) #

[View source]
def salt : Slice(UInt8) #

[View source]
def salt=(salt : Slice(UInt8)) #

[View source]