Method: Fastlane::Helper::EncryptionHelper.encrypt
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb
.encrypt(plain_text, key) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb', line 20 def self.encrypt(plain_text, key) # Ensure consistent encoding plain_text.force_encoding(Encoding::UTF_8) cipher = cipher(OperationType::ENCRYPT) cipher.key = key encrypted = cipher.update(plain_text) encrypted << cipher.final encrypted end |