當嘗試加密資料時,NullEncryptor
會觸發錯誤
當您想要揭示密碼文字以進行除錯時,而且您想要確保不會使用錯誤內容覆寫任何可加密屬性,這很有用。
方法
- B
- D
- E
實例公開方法
binary?() 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 23 def binary? false end
decrypt(encrypted_text, key_provider: nil, cipher_options: {}) 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 15 def decrypt(encrypted_text, key_provider: nil, cipher_options: {}) encrypted_text end
encrypt(clean_text, key_provider: nil, cipher_options: {}) 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 11 def encrypt(clean_text, key_provider: nil, cipher_options: {}) raise Errors::Encryption, "This encryptor is read-only" end
encrypted?(text) 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 19 def encrypted?(text) false end