mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/encryption/EncryptMessageServiceImpl.java
public void saveStaticKeyPair(final String staticPublicKeyString, final String staticPrivateKeyString)
    {

        //Save the string in hexadecimal format in "th.encryption.public.properties"
        m_PropPublic.setProperty("public.key", staticPublicKeyString);
        try (FileOutputStream outputStream = new FileOutputStream(m_PropFilePublic))
        {
            m_PropPublic.store(outputStream, "Encryption Properties , last property edited was 'publicStaticKey'");
        }
        catch (final IOException ex)
        {
            m_Logging.log(LogService.LOG_ERROR, "Unable to write public key to file: " + ex.getMessage());
        }
        

        //Save the string in hexadecimal format in "th.encryption.private.properties"
        m_PropPrivate.setProperty(PRIVATE_KEY, staticPrivateKeyString);
        try (FileOutputStream outputStream = new FileOutputStream(m_PropFilePrivate))
        {
            m_PropPrivate.store(outputStream, "Encryption Properties , last property edited was 'privateStaticKey'");
        }
        catch (final IOException ex)
        {
            m_Logging.log(LogService.LOG_ERROR, "Unable to write private key to file: " + ex.getMessage());
        }
    }
/**
     * Save the private static key in the "th.encryption.private.properties" file.
     * Save the public static key in the "th.encryption.public.properties" file 
     * @param staticPublicKeyString
     *         This is the public static key encoded in hexadecimal string
     * @param staticPrivateKeyString
     *         This is the private static key string encoded in hexadecimal string
     *        
     */
Save the private static key in the "th.encryption.private.properties" file.
Save the public static key in the "th.encryption.public.properties" file
@param staticPublicKeyString
This is the public static key encoded in hexadecimal string
@param staticPrivateKeyString
This is the private static key string encoded in hexadecimal string
Save the private static key in the " th . encryption . private . properties " file . Save the public static key in the " th . encryption . public . properties " file @param staticPublicKeyString This is the public static key encoded in hexadecimal string @param staticPrivateKeyString This is the private static key string encoded in hexadecimal string
public void saveStaticKeyPair(final String staticPublicKeyString, final String staticPrivateKeyString)
    {
        m_PropPublic.setProperty("public.key", staticPublicKeyString);
        try (FileOutputStream outputStream = new FileOutputStream(m_PropFilePublic))
        {
            m_PropPublic.store(outputStream, "Encryption Properties , last property edited was 'publicStaticKey'");
        }
        catch (final IOException ex)
        {
            m_Logging.log(LogService.LOG_ERROR, "Unable to write public key to file: " + ex.getMessage());
        }
        m_PropPrivate.setProperty(PRIVATE_KEY, staticPrivateKeyString);
        try (FileOutputStream outputStream = new FileOutputStream(m_PropFilePrivate))
        {
            m_PropPrivate.store(outputStream, "Encryption Properties , last property edited was 'privateStaticKey'");
        }
        catch (final IOException ex)
        {
            m_Logging.log(LogService.LOG_ERROR, "Unable to write private key to file: " + ex.getMessage());
        }
    }
public void saveStaticKeyPair ( final String staticPublicKeyString , final String staticPrivateKeyString ) { m_PropPublic . setProperty ( "public.key" , staticPublicKeyString ) ; try ( FileOutputStream outputStream = new FileOutputStream ( m_PropFilePublic ) ) { m_PropPublic . store ( outputStream , "Encryption Properties , last property edited was 'publicStaticKey'" ) ; } catch ( final IOException ex ) { m_Logging . log ( LogService . LOG_ERROR , "Unable to write public key to file: " + ex . getMessage ( ) ) ; } m_PropPrivate . setProperty ( PRIVATE_KEY , staticPrivateKeyString ) ; try ( FileOutputStream outputStream = new FileOutputStream ( m_PropFilePrivate ) ) { m_PropPrivate . store ( outputStream , "Encryption Properties , last property edited was 'privateStaticKey'" ) ; } catch ( final IOException ex ) { m_Logging . log ( LogService . LOG_ERROR , "Unable to write private key to file: " + ex . getMessage ( ) ) ; } }
Save the private static key in the "th.encryption.private.properties" file.
Save the private static key in the " th . encryption . private . properties " file .
//Save the string in hexadecimal format in "th.encryption.public.properties" //Save the string in hexadecimal format in "th.encryption.private.properties"