Sha256: 543131bda68f3a018c4a9d467ceed9df50511eb93c0c3159b87403f38944cad4

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

When /^I create a key pair(?: owned by "(.*?)")?$/ do |owner|
  options = {}
  if owner
    options[:ownerid] = interpret_value(owner)
  end
  create_variable :key_pair, options
end

When /^I(?: can)? decrypt with the key pair$/ do
  attempt do
    @plaintext_output = variable(:key_pair).decrypt @encrypted_data
  end
end

When /^I(?: can)? encrypt with the key pair$/ do
  attempt do
    @plaintext_input = SecureRandom.uuid
    @encrypted_data = variable(:key_pair).encrypt(@plaintext_input)
  end
end

Then /^the decrypted data is round-tripped$/ do
  @plaintext_input.should == @plaintext_output
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conjur-asset-key-pair-0.2.1 lib/conjur/asset/key-pair/cucumber/key_pair_steps.rb