code: public byte[] encrypt(byte[] data, Key sharedKey) throws AuditEncryptingException {
          if (data == null) {
              Tr.error(tc, "security.audit.encryption.data.error");
              throw new AuditEncryptingException("Invalid data passed into the encryption algorithm.");
          }
          if (sharedKey == null) {
              Tr.error(tc, "security.audit.invalid.shared.key.error");
              throw new AuditEncryptingException("Invalid shared key has been encountered.");
          }
  
          AuditCrypto ac = new AuditCrypto();
  
          byte[] encryptedData = ac.encrypt(data, sharedKey.getEncoded());
          return encryptedData;
      }
docs: <p>
  The <code>encrypt</code> operation takes a UTF-8 encoded String in the form of a byte[].
  The byte[] is generated from String.getBytes("UTF-8").
  An encrypted byte[] is returned.
  </p>
  
  @param byte[] data to encrypt
  @param java.security.Key shared key
  @return byte[] of encrypted data
  @throws com.ibm.wsspi.security.audit.AuditEncryptException