Sha256: cacbd25b564072616b09b7a38f32dea5c269e26bd6677f2d51d21b23590105e7
Contents?: true
Size: 309 Bytes
Versions: 21
Compression:
Stored size: 309 Bytes
Contents
# frozen_string_literal: true # addon for the Atome class class Atome def calculate_sha(string) if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi' # `sha256(#{string})` js_code = "sha256('#{string}')" JS.eval(js_code) else Digest::SHA256.hexdigest(string) end end end
Version data entries
21 entries across 21 versions & 1 rubygems