1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix typos encryption doc (#41817)

* fix typo

[ci skip]
This commit is contained in:
Sampat Badhe 2021-04-02 10:54:43 +05:30 committed by GitHub
parent 3648c25cad
commit 2032daa415
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ module ActiveRecord
end
# Returns a random key in hexadecimal format. The key will have a size in bytes of +:length+ (configured +Cipher+'s
# lenght by default)
# length by default)
#
# Hexadecimal format is handy for representing keys as printable text. To maximize the space of characters used, it is
# good practice including not printable characters. Hexadecimal format ensures that generated keys are representable with

View file

@ -119,14 +119,14 @@ If you need to support a custom type, the recommended way is using a [serialized
```ruby
# GOOD
class Article < ApplicationRecord
serialize :title, Title
serialize :title, Title
encrypts :title
end
# WRONG
class Article < ApplicationRecord
encrypts :title
serialize :title, Title
serialize :title, Title
end
```
@ -404,7 +404,7 @@ The available config options are:
| `deterministic_key` | The key or list of keys used for deterministic encryption. It's preferred to configure it via a credential `active_record_encryption.deterministic_key`. |
| `key_derivation_salt` | The salt used when deriving keys. It's preferred to configure it via a credential `active_record_encryption.key_derivation_salt`. |
NOTE: It's recommende to use Rails built-in credentials support to store keys. If you prefer to set them manually via config properties, make sure you don't commit them with your code (e.g: use environment variables).
NOTE: It's recommended to use Rails built-in credentials support to store keys. If you prefer to set them manually via config properties, make sure you don't commit them with your code (e.g: use environment variables).
### Encryption contexts