Skip to content

Documentation


Documentation / @blazetrails/activesupport / EncryptedFile

Class: EncryptedFile ​

Defined in: packages/activesupport/lib/encrypted-file.ts:44

Extended by ​

Constructors ​

Constructor ​

new EncryptedFile(opts): EncryptedFile

Defined in: packages/activesupport/lib/encrypted-file.ts:57

Parameters ​

ParameterType
optsEncryptedFileOptions

Returns ​

EncryptedFile

Missing Rails Call ​

new — PERMANENT

Properties ​

contentPath ​

readonly contentPath: string

Defined in: packages/activesupport/lib/encrypted-file.ts:47


envKey ​

readonly envKey: string

Defined in: packages/activesupport/lib/encrypted-file.ts:49


keyPath ​

readonly keyPath: string

Defined in: packages/activesupport/lib/encrypted-file.ts:48


raiseIfMissingKey ​

readonly raiseIfMissingKey: boolean

Defined in: packages/activesupport/lib/encrypted-file.ts:50

Methods ​

change() ​

change(block): Promise<void>

Defined in: packages/activesupport/lib/encrypted-file.ts:102

Parameters ​

ParameterType
block(tmpPath) => void | Promise<void>

Returns ​

Promise<void>


isKey() ​

isKey(): Promise<boolean>

Defined in: packages/activesupport/lib/encrypted-file.ts:81

Returns ​

Promise<boolean>


key() ​

key(): Promise<string | null>

Defined in: packages/activesupport/lib/encrypted-file.ts:73

Returns ​

Promise<string | null>


read() ​

read(): Promise<string>

Defined in: packages/activesupport/lib/encrypted-file.ts:87

Returns ​

Promise<string>

Missing Rails Name ​

strip — PERMANENT


write() ​

write(contents): Promise<void>

Defined in: packages/activesupport/lib/encrypted-file.ts:96

Parameters ​

ParameterType
contentsstring

Returns ​

Promise<void>


expectedKeyLength() ​

static expectedKeyLength(): number

Defined in: packages/activesupport/lib/encrypted-file.ts:68

Returns ​

number


generateKey() ​

static generateKey(): string

Defined in: packages/activesupport/lib/encrypted-file.ts:64

Returns ​

string