Class: MiqAePassword

Inherits:
MiqPassword
  • Object
show all
Defined in:
lib/miq_automation_engine/models/miq_ae_password.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.decrypt(str) ⇒ Object


9
10
11
# File 'lib/miq_automation_engine/models/miq_ae_password.rb', line 9

def self.decrypt(str)
  MiqPassword.decrypt(str)
end

.decrypt_if_password(obj) ⇒ Object


13
14
15
# File 'lib/miq_automation_engine/models/miq_ae_password.rb', line 13

def self.decrypt_if_password(obj)
  obj.kind_of?(MiqAePassword) ? MiqPassword.decrypt(obj.encStr) : obj
end

.encrypt(str) ⇒ Object


4
5
6
7
# File 'lib/miq_automation_engine/models/miq_ae_password.rb', line 4

def self.encrypt(str)
  return str if str.blank? || self.encrypted?(str)
  MiqPassword.encrypt(str)
end

Instance Method Details

#inspectObject


21
22
23
# File 'lib/miq_automation_engine/models/miq_ae_password.rb', line 21

def inspect
  "\"#{self}\""
end

#to_sObject


17
18
19
# File 'lib/miq_automation_engine/models/miq_ae_password.rb', line 17

def to_s
  "********"
end