@Test public void toBase64AndBack() throws GeneralSecurityException { for (int i=0; i<base64Strings.size(); i++) { String before = base64Strings.get(i); String after = new EmailIdentity(before).getFullKey(); assertEquals(before, after); } }
public String getFullKey() throws GeneralSecurityException { PublicKeyPair publicKeys = new PublicKeyPair(publicEncryptionKey, publicSigningKey); PrivateKeyPair privateKeys = new PrivateKeyPair(privateEncryptionKey, privateSigningKey); String pubKeys = cryptoImpl.toBase64(publicKeys); String privKeys = cryptoImpl.toBase64(privateKeys); return pubKeys + privKeys; }
EmailIdentity extends EmailDestination { public String getFullKey() throws GeneralSecurityException { PublicKeyPair publicKeys = new PublicKeyPair(publicEncryptionKey, publicSigningKey); PrivateKeyPair privateKeys = new PrivateKeyPair(privateEncryptionKey, privateSigningKey); String pubKeys = cryptoImpl.toBase64(publicKeys); String privKeys = cryptoImpl.toBase64(privateKeys); return pubKeys + privKeys; } }
EmailIdentity extends EmailDestination { public String getFullKey() throws GeneralSecurityException { PublicKeyPair publicKeys = new PublicKeyPair(publicEncryptionKey, publicSigningKey); PrivateKeyPair privateKeys = new PrivateKeyPair(privateEncryptionKey, privateSigningKey); String pubKeys = cryptoImpl.toBase64(publicKeys); String privKeys = cryptoImpl.toBase64(privateKeys); return pubKeys + privKeys; } EmailIdentity(CryptoImplementation cryptoImpl, String vanityPrefix);  EmailIdentity(String base64Key); }
EmailIdentity extends EmailDestination { public String getFullKey() throws GeneralSecurityException { PublicKeyPair publicKeys = new PublicKeyPair(publicEncryptionKey, publicSigningKey); PrivateKeyPair privateKeys = new PrivateKeyPair(privateEncryptionKey, privateSigningKey); String pubKeys = cryptoImpl.toBase64(publicKeys); String privKeys = cryptoImpl.toBase64(privateKeys); return pubKeys + privKeys; } EmailIdentity(CryptoImplementation cryptoImpl, String vanityPrefix);  EmailIdentity(String base64Key); PrivateKey getPrivateEncryptionKey(); PrivateKey getPrivateSigningKey(); void setPublicName(String publicName); String getPublicName(); void setDescription(String description); String getDescription(); void setEmailAddress(String emailAddress); String getEmailAddress(); void setPublished(boolean published); boolean isPublished(); void setPicture(byte[] picture); byte[] getPicture(); void setPictureBase64(String pictureBase64); String getPictureBase64(); String getPictureType(); void setText(String text); String getText(); void generateFingerprint(); void setFingerprint(Fingerprint fingerprint); Fingerprint getFingerprint(); static Hash calculateHash(String name); void setDefaultIdentity(boolean defaultIdentity); boolean isDefaultIdentity(); String getFullKey(); @Override String toString(); void loadConfig(Properties properties, String prefix, boolean overwrite); Properties saveConfig(String prefix); IdentityConfig getConfig(); IdentityConfig getWrappedConfig(Configuration configuration); void setIncludeInGlobalCheck(boolean include); boolean getIncludeInGlobalCheck(); }
EmailIdentity extends EmailDestination { public String getFullKey() throws GeneralSecurityException { PublicKeyPair publicKeys = new PublicKeyPair(publicEncryptionKey, publicSigningKey); PrivateKeyPair privateKeys = new PrivateKeyPair(privateEncryptionKey, privateSigningKey); String pubKeys = cryptoImpl.toBase64(publicKeys); String privKeys = cryptoImpl.toBase64(privateKeys); return pubKeys + privKeys; } EmailIdentity(CryptoImplementation cryptoImpl, String vanityPrefix);  EmailIdentity(String base64Key); PrivateKey getPrivateEncryptionKey(); PrivateKey getPrivateSigningKey(); void setPublicName(String publicName); String getPublicName(); void setDescription(String description); String getDescription(); void setEmailAddress(String emailAddress); String getEmailAddress(); void setPublished(boolean published); boolean isPublished(); void setPicture(byte[] picture); byte[] getPicture(); void setPictureBase64(String pictureBase64); String getPictureBase64(); String getPictureType(); void setText(String text); String getText(); void generateFingerprint(); void setFingerprint(Fingerprint fingerprint); Fingerprint getFingerprint(); static Hash calculateHash(String name); void setDefaultIdentity(boolean defaultIdentity); boolean isDefaultIdentity(); String getFullKey(); @Override String toString(); void loadConfig(Properties properties, String prefix, boolean overwrite); Properties saveConfig(String prefix); IdentityConfig getConfig(); IdentityConfig getWrappedConfig(Configuration configuration); void setIncludeInGlobalCheck(boolean include); boolean getIncludeInGlobalCheck();  }