Class: BlockCipherKit::KeyMaterial
- Inherits:
-
Object
- Object
- BlockCipherKit::KeyMaterial
- Extended by:
- Forwardable
- Defined in:
- lib/block_cipher_kit/key_material.rb
Overview
Allows a string with key material (like IV and key) to be concealed when an object holding it gets printed or show via #inspect :nodoc:
Instance Method Summary collapse
-
#initialize(str) ⇒ KeyMaterial
constructor
A new instance of KeyMaterial.
- #inspect ⇒ Object
Constructor Details
#initialize(str) ⇒ KeyMaterial
Returns a new instance of KeyMaterial.
10 11 12 |
# File 'lib/block_cipher_kit/key_material.rb', line 10 def initialize(str) @str = str end |
Instance Method Details
#inspect ⇒ Object
14 15 16 |
# File 'lib/block_cipher_kit/key_material.rb', line 14 def inspect "[SENSITIVE(#{@str.bytesize * 8} bits)]" end |