Changeset 1256 for trunk


Ignore:
Timestamp:
03/18/19 17:12:10 (5 years ago)
Author:
bln4
Message:

Use SecureRandom to generate personal key.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/Actions.java

    r1250 r1256  
    1717import java.security.PrivateKey;
    1818import java.security.PublicKey;
     19import java.security.SecureRandom;
    1920import java.security.cert.CertificateException;
    2021import java.security.spec.InvalidKeySpecException;
     
    359360                // Generate keys
    360361                //      Personal key
    361                 Random rand = new Random();
     362                Random rand = new SecureRandom();
    362363                byte[] keyBytes = new byte[16];
    363364                rand.nextBytes(keyBytes);
     
    420421                        KeyList.PersonalKey.setSetting(backupPersonalKey);
    421422                }
     423               
     424                System.out.println(message + "Establishing user credentials.");
    422425                               
    423426                // Create credentials
Note: See TracChangeset for help on using the changeset viewer.