Sha256: cd8fd69e42601ffb199305092e0c232254b5ae01296749be149d138e9a99d7fe

Contents?: true

Size: 339 Bytes

Versions: 19

Compression:

Stored size: 339 Bytes

Contents

require 'spec_helper'

describe SimpleCrypt do

  it 'should crypt/decrypt by secret key' do
    key = 'very_secret-key'
    @sc = SimpleCrypt.new(key)

    original_word = 'WORD'
    result = @sc.encrypt(original_word)

    expect(result).to eq("w88LiGPM279AZCpOZvyF2w==\n")
    expect(@sc.decrypt(result)).to eq(original_word)
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
tarvit-helpers-0.0.23 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.22 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.21 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.20 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.19 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.18 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.17 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.16 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.15 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.14 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.13 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.12 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.11 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.10 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.9 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.8 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.6 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.5 spec/modules/simple_crypt_spec.rb
tarvit-helpers-0.0.4 spec/modules/simple_crypt_spec.rb