modify AES secure random key generate method