This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import javax.crypto.*; | |
| import javax.crypto.spec.GCMParameterSpec; | |
| import java.nio.ByteBuffer; | |
| import java.security.SecureRandom; | |
| import java.util.Arrays; | |
| public class AESGCMUpdateAAD2 { | |
| // AES-GCM parameters | |
| public static final int AES_KEY_SIZE = 128; // in bits | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /** | |
| * Author: Ian Gallagher <igallagher@securityinnovation.com> | |
| * | |
| * This code utilizes jBCrypt, which you need installed to use. | |
| * jBCrypt: http://www.mindrot.org/projects/jBCrypt/ | |
| */ | |
| public class Password { | |
| // Define the BCrypt workload to use when generating password hashes. 10-31 is a valid value. | |
| private static int workload = 12; |