コード例 #1
0
 /**
  * Creates a new instance of SymmetricKeyInfo.
  *
  * @param aesKey
  * @param iv
  * @param sequence
  * @param keyID
  */
 public SymmetricKeyInfo(String keyID) {
   this.aesKey = SymmetricCryptographyHelper.generateAESKey();
   this.iv = SymmetricCryptographyHelper.generateIV();
   this.sequence = SecurityHelper.createLongSequenceBase();
   this.keyID = keyID;
 }
コード例 #2
0
 /**
  * Creates a new instance of SymmetricKeyInfo.
  *
  * @param aesKey
  * @param iv
  */
 public SymmetricKeyInfo(SecretKey aesKey, byte[] iv) {
   this.aesKey = aesKey;
   this.iv = iv;
   this.sequence = SecurityHelper.createLongSequenceBase();
   this.keyID = null;
 }