spec/parser_spec.rb in lastpass-1.5.0 vs spec/parser_spec.rb in lastpass-1.6.0
- old
+ new
@@ -4,11 +4,11 @@
require "spec_helper"
require_relative "test_data"
describe LastPass::Parser do
let(:key_iteration_count) { 5000 }
- let(:blob) { LastPass::Blob.new TEST_BLOB, key_iteration_count }
+ let(:blob) { LastPass::Blob.new TEST_BLOB, key_iteration_count, "DEADBEEF" }
let(:padding) { "BEEFFACE"}
let(:encryption_key) { "OfOUvVnQzB4v49sNh4+PdwIFb9Fr5+jVfWRTf+E2Ghg=".decode64 }
let(:encoded_rsa_key) { "98F3F5518AE7C03EBBF195A616361619033509FB1FFA0408E883B7C5E80381F8" +
"C8A343925DDA78FB06A14324BEC77EAF63290D381F54763A2793FE25C3247FC0" +
"29022687F453426DE96A9FB34CEB55C02764FB41E5E1619226FE47FA7EA40B41" +
@@ -112,12 +112,13 @@
it "parses accounts" do
expect(accounts.map &:id).to eq TEST_ACCOUNTS.map &:id
end
end
- describe ".parse_PRIK" do
- let(:chunk) { LastPass::Chunk.new "PRIK", encoded_rsa_key }
- let(:rsa_key) { LastPass::Parser.parse_PRIK chunk, rsa_key_encryption_key }
+ describe ".parse_private_key" do
+ let(:rsa_key) {
+ LastPass::Parser.parse_private_key encoded_rsa_key, rsa_key_encryption_key
+ }
it "parses private key" do
expect(rsa_key).to be_instance_of OpenSSL::PKey::RSA
expect(rsa_key.n.to_s).to eq "26119467519435514320618523953258926539081857789201" +
"11592360794055150234493177840791445076164320959092" +