Skip to content

Commit f6a8cb4

Browse files
Fix Active Record Encryption credentials example [ci-skip]
Active Record Encryption uses the `active_record_encryption` credentials namespace, rather than `active_record`.`encryption`.
1 parent 7bcee19 commit f6a8cb4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

guides/source/active_record_encryption.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ There is an important concern about string column sizes: in modern databases the
7474

7575
In practice, this means:
7676

77-
* When encrypting short texts written in western alphabets (mostly ASCII characters), you should account for that 255 additional overhead when defining the column size.
77+
* When encrypting short texts written in western alphabets (mostly ASCII characters), you should account for that 255 additional overhead when defining the column size.
7878
* When encrypting short texts written in non-western alphabets, such as Cyrillic, you should multiply the column size by 4. Notice that the storage overhead is 255 bytes at most.
7979
* When encrypting long texts, you can ignore column size concerns.
8080

@@ -373,12 +373,11 @@ Active Record uses the key to derive the key used to encrypt and decrypt the dat
373373
- All the keys will be tried when decrypting content until one works.
374374

375375
```yml
376-
active_record
377-
encryption:
378-
primary_key:
379-
- a1cc4d7b9f420e40a337b9e68c5ecec6 # Previous keys can still decrypt existing content
380-
- bc17e7b413fd4720716a7633027f8cc4 # Active, encrypts new content
381-
key_derivation_salt: a3226b97b3b2f8372d1fc6d497a0c0d3
376+
active_record_encryption:
377+
primary_key:
378+
- a1cc4d7b9f420e40a337b9e68c5ecec6 # Previous keys can still decrypt existing content
379+
- bc17e7b413fd4720716a7633027f8cc4 # Active, encrypts new content
380+
key_derivation_salt: a3226b97b3b2f8372d1fc6d497a0c0d3
382381
```
383382

384383
This enables workflows in which you keep a short list of keys by adding new keys, re-encrypting content, and deleting old keys.

0 commit comments

Comments
 (0)