README.md in poly_pseudo-0.1.0 vs README.md in poly_pseudo-0.1.1
- old
+ new
@@ -23,10 +23,14 @@
## Usage
```ruby
require 'poly_pseudo'
+identity_key = PolyPseudo::Util.read_key(File.read('EI_Decryption.pem'))
+decryption_key = PolyPseudo::Util.read_key(File.read('EP_Decryption.pem'))
+closing_key = PolyPseudo::Util.read_key(File.read('EP_Closing.pem'))
+
encoded_asn1 = <<-BASE64
MIIBVAYMYIQQAYdrg+MFAQIBAgEBAgEBFhQwMDAwMDAwNDAwMzIxNDM0NTAwMRYU
MDAwMDAwMDMyNzMyMjYzMTAwMDACBAEzok4wgfkEUQQdTrTmvUoznOB+4bGfted+
sc7mnN2M2k9T/c2ZXvOYf8CwniAsnxVgzTzsoEpg8NRJq6aBjFCyBz3NwOulwrNE
4/Q+2v0eE6R9Cvd8ngeL7QRRBEybIwRxjf6/9xWlMSg3aINSJf2GQaJjkp+uQudg
@@ -35,13 +39,9 @@
t38iHgW3leqaRomZgNHbjQEgCCy/2VJgdwQYDSs/j++K1KtUMOgEEAAAAAAAAAAA
AAAAAAAAAAA=
BASE64
identity_or_pseudonym = PolyPseudo::PseudoId.from_asn1(encoded_asn1)
-
-identity_key = PolyPseudo::Util.read_key(File.read('EI_Decryption.pem'))
-decryption_key = PolyPseudo::Util.read_key(File.read('EP_Decryption.pem'))
-closing_key = PolyPseudo::Util.read_key(File.read('EP_Closing.pem'))
case identity_or_pseudonym
when PolyPseudo::Identity
identity_or_pseudonym.decrypt(identity_key)
when PolyPseudo::Pseudonym