Method: Match::Encryption::EncryptionV1#decrypt
- Defined in:
- match/lib/match/encryption/encryption.rb
#decrypt(encrypted_data:, password:, salt:, hash_algorithm: "MD5") ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'match/lib/match/encryption/encryption.rb', line 24 def decrypt(encrypted_data:, password:, salt:, hash_algorithm: "MD5") cipher = ::OpenSSL::Cipher.new(ALGORITHM) cipher.decrypt keyivgen(cipher, password, salt, hash_algorithm) data = cipher.update(encrypted_data) data << cipher.final end |