/** * 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; }
/** * 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; }