Module: NativeCrypto
- Defined in:
- lib/virgil/native_crypto.rb
Constant Summary collapse
- LIBRARIES_URL =
'https://cdn.virgilsecurity.com/virgil-crypto/ruby/'.freeze
Class Method Summary collapse
Class Method Details
.download ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/virgil/native_crypto.rb', line 47 def self.download file_name = "virgil_crypto_ruby.#{os_ext == 'linux' ? 'so' : 'bundle'}" source_url = LIBRARIES_URL + library_path puts "Downloading #{source_url}..." system('mkdir -p tmp') core_path = 'tmp/crypto_core.tar.gz' download_archive(source_url, core_path) extract_library(core_path, file_name) end |