examples/appnet-api-server/src/main/java/com/hedera/hashgraph/identity/hcs/example/appnet/AppnetStorage.java
/**
   * Persists crediential issuers to a file.
   */
Persists crediential issuers to a file.
Persists crediential issuers to a file .
private void persistCredentialIssuers() {
    try (OutputStream fos = Files.newOutputStream(Paths.get(CREDENTIAL_ISSUERS_FILE_PATH), StandardOpenOption.CREATE)) {
      ObjectOutputStream oos = new ObjectOutputStream(fos);
      Map<String, String> persistedCredentialIssuers = new HashMap<>();
      for (Map.Entry<String, PublicKey> entry : this.credentialIssuers.entrySet()) {
        persistedCredentialIssuers.put(entry.getKey(), entry.getValue().toString());
      }
      oos.writeObject(persistedCredentialIssuers);
      oos.close();
      log.info("Serialized signatures data is saved in credentialIssuers.ser");
    } catch (IOException ioe) {
      log.error(ioe.getMessage());
    }
  }
private void persistCredentialIssuers ( ) { try ( OutputStream fos = Files . newOutputStream ( Paths . get ( CREDENTIAL_ISSUERS_FILE_PATH ) , StandardOpenOption . CREATE ) ) { ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; Map < String , String > persistedCredentialIssuers = new HashMap < > ( ) ; for ( Map . Entry < String , PublicKey > entry : this . credentialIssuers . entrySet ( ) ) { persistedCredentialIssuers . put ( entry . getKey ( ) , entry . getValue ( ) . toString ( ) ) ; } oos . writeObject ( persistedCredentialIssuers ) ; oos . close ( ) ; log . info ( "Serialized signatures data is saved in credentialIssuers.ser" ) ; } catch ( IOException ioe ) { log . error ( ioe . getMessage ( ) ) ; } }
Persists crediential issuers to a file.
Persists crediential issuers to a file .
// Ed25519public key is not serializable, perform the conversion here