lib/crypt_keeper/provider/postgres_pgp_public_key.rb
# Public: Decrypts a string
#
# Returns a plaintext string
Decrypts a string
Returns a plaintext string
Decrypts a string Returns a plaintext string
def decrypt(value)
        if @private_key.present?
          escape_and_execute_sql(["SELECT pgp_pub_decrypt(?, dearmor(?), ?)", value, @private_key, @key])['pgp_pub_decrypt']
        else
          value
        end
      end
def decrypt ( value ) if @private_key . present? escape_and_execute_sql ( [ "SELECT pgp_pub_decrypt(?, dearmor(?), ?)" , value , @private_key , @key ] ) [ 'pgp_pub_decrypt' ] else value end end
Public: Decrypts a string
Returns a plaintext string
Public : Decrypts a string Returns a plaintext string
value
<not_specific>