public static DecryptKey FromPem(string pem) { var parser = new DecryptKeyParser(pem); parser.Decode(); return(parser.GetContent()); }
protected DecryptKey(DecryptKeyParser parser) { SchemeVersion = parser.GetSchemeVersion(); SchemeKeyVersion = parser.GetSchemeKeyVersion(); Recipient = parser.GetRecipient(); RecipientKeySetVersion = parser.GetRecipientKeySetVersion(); PrivateKey = parser.GetPrivateKey(); publicKey = parser.GetPublicKey(); }
private static DecryptKey FromPem(string pem) { var parser = new DecryptKeyParser(pem); parser.Decode(); switch (parser.GetDecryptKeyType().Name) { case DecryptKeyType.IdentityDecryptionName: return(new IdentityDecryptKey(parser)); case DecryptKeyType.PseudonymDecryptionName: return(new PseudonymDecryptKey(parser)); case DecryptKeyType.PseudonymClosingName: return(new PseudonymClosingKey(parser)); default: throw new PolymorphicPseudonymisationException($"Unknown type {parser.GetDecryptKeyType().Name}"); } }
public IdentityDecryptKey(DecryptKeyParser parser) : base(parser) { }
protected internal PseudonymClosingKey(DecryptKeyParser parser) : base(parser) { }
public static DecryptKey FromPem(string pem) { var parser = new DecryptKeyParser(); return(parser.Decode(pem)); }
public PseudonymDecryptKey(DecryptKeyParser parser) : base(parser) { }